Re:Care is needed to use C++ std:optional with non-trivial o...
by kllrnohj on Friday January 13, 2023 @10:55AM
(#34369502)
A "move" of a POD value type is still a copy and std::move/std::forward don't do anything (same in Rust for Copy traits).
Rather the Rust feature that's missing here is the compiler automatically converting pass-by-(move)value to a pass-by-reference under the covers.
Typically C++ requires a lot of plumbing to use value semantics with `std::move` everywhere and `std::forward`.
I don't have patience for it anymore, so I just use Rust which is move by default.