ham icon indicating copy to clipboard operation
ham copied to clipboard

constness in offload/offload.hpp

Open marehr opened this issue 6 years ago • 1 comments

There are a couple of functions that take ham::offload::buffer_ptr as reference.

Could those invocation also be const &?

https://github.com/noma/ham/blob/5649c04291336e0df172734ca8631d7be3020dbd/include/ham/offload/offload.hpp#L218-L223

marehr avatar May 24 '18 12:05 marehr

Should be possible, only the operator[] is non-const, but I think it could be const too, as it only allows changing the state of the pointee, not the pointer itself... always confusing with smart pointers. ;-)

noma avatar Jul 03 '18 11:07 noma