logoalt Hacker News

creata • today at 4:38 PM • 2 replies • view on HN

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

What C++23 feature allows that?


Replies

aw1621107 • today at 6:29 PM

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-...