kamping-site / kamping

KaMPIng: (Near) zero-overhead MPI wrapper for modern C++
https://kamping-site.github.io/kamping/
GNU Lesser General Public License v3.0
35 stars 0 forks source link

Fix/do not store owning data as const #752

Closed mschimek closed 1 month ago

mschimek commented 2 months ago

We should avoid storing the underlying data as const in constant owning data buffers. While using const ensures read-only access via C++'s constness guarantees, it also results in unnecessary data copying when attempting to extract the data. Moreover, this approach prevents storing move-only types altogether.