upvote
> C++23 Rust-like move semantics can be used

What C++23 feature allows that?

reply
The closest thing I can think of is trivial relocation [0] which matches the bitwise copy + no destructor on moved-from bits of Rust's moves, but that was only added to the draft for C++26 and was removed late in the process anyways [1].

[0]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p27...

[1]: https://herbsutter.com/2025/11/10/trip-report-november-2025-...

reply
reply
I think that's basically clarifying the conditions under which C++11-style moves can be performed.
reply