3 ms·
fair enough, but also the semantics of a Rust 'move' aren't identical to C++ std::move anyways. you can "get it back" after the function call, as it's a borrow,
by cmrdporcupine 4y ago
fair enough, but also the semantics of a Rust 'move' aren't identical to C++ std::move anyways. you can "get it back" after the function call, as it's a borrow, not a move.
Makes me wonder out loud if the C++ community isn't going to add some kind of std::borrow/std::return_borrowed to the language. If that's even feasible with the type system and reference system as it is today.