4 ms·
does Rust basically have the same 'move' semantics as C++ ?
by cmollis 9y ago
does Rust basically have the same 'move' semantics as C++ ?
- steveklabnik 9y agoYes and no. The idea is the same, the implementation is very different. Rust is “move by default, move always means memcpy (and they often can be elided), no move constructors,” to (possibly too) succinctly describe it.
- cmollis 9y agocool.. I didn't realize that move meant memcpy.. does this operation destroy the original object?