Remix.run Logo
htfy96 a day ago

Correct. As someone who maintain a 16-year-old C++ code base with new features added every day, The status quo is the best incremental improvement over deep copy semantics.

There are better choices if everything is built from scratch, but changing wheels from a running car isn't easy.

einpoklum a day ago | parent [-]

Sorry to be the nitpicker here, but - the best incremental improvement would probably have seen move-destruction instead of just moves, which keep the source object alive and force the allowance for a valid 'empty' or 'dummy' state.

See also:

* https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n13... move designs

* https://www.foonathan.net/2017/09/destructive-move/