noma / ham

Heterogeneous Active Messages C++ library
Boost Software License 1.0
21 stars 6 forks source link

constness in offload/offload.hpp #12

Open marehr opened 6 years ago

marehr commented 6 years ago

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

noma commented 6 years ago

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. ;-)