3 ms·
It's an immediate red flag to see `T::T(T)` used anywhere for non-trivial objects or PODs or something not word-size. Typically C++ requires a lot of plumbing
by throway2kl4223 4y ago
It's an immediate red flag to see `T::T(T)` used anywhere for non-trivial objects or PODs or something not word-size.
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.
- kllrnohj 4y agoA "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.