3 ms·
It's a language feature if your language has copy and move constructors. Rust doesn't, so it's just an optimization. In C++ the code will have different semant
by Manishearth 10y ago
It's a language feature if your language has copy and move constructors.
Rust doesn't, so it's just an optimization. In C++ the code will have different semantics (e.g. if your move ctors have side effects) based on this optimization, so the language needs to define if/how it works.