C++23 Implicit Moves: Say Goodbye to std::move
Move in C++ without a std:move

Andreas Fertig explores how C++23's implicit move rules simplify code and improve performance. He revisits his earlier advice to use std::move rarely, showing that with C++23, functions returning rvalue reference parameters now move automatically, eliminating the need for manual std::move calls. This change builds on guaranteed copy elision since C++17 and makes following his advice easier than ever.
Once you switch your compiler to C++23 mode, both cases do an implicit move. No std::move required.
- tom_
If the author is reading: both complicated examples are the same.
- fluoridation
Unfortunately, I don't think there's getting away from just understanding value semantics to get the correct and/or performant behavior.
- vivzkestrel
- stupid question, since we are on the topic of c++, i finished reading through learncpp.com
- how do I take this from 0 to the guy that builds a play station 3 emulator?
- like seriously what kind of step by step projects or learning experiences in increasing order of difficulty do you recommend to get really really good at c++
- sprocketz
What is that makes NVRO so much more difficult to implement? Why couldn't they mandate that just like RVO?
Do compilers literally just special case a simple return statement of a direct construction or something?
- hn45e7pbij
I'd push back slightly on move — at small scale the opposite has been true for me.