News for hackers. Stuff that matters.
Re:Move in C++ without a std:move by dataflow on Wednesday September 02, 2026 @11:59AM (#49538262)
No, all you're showing in that example is that a pointer is passed as part of the ABI. You're not showing that RVO relates to that in any way whatsoever. If you write the same function in a manner that (N)RVO can't kick in, does the pointer no longer get passed?

The reason this should sound dubious is that you're suggesting the caller needs to know the callee's body in order to know how to call it, but it should be possible for the two to be compiled entirely independently, and in fact mutual recursions should be fine too. After all, the callee knows where the return value has to land either way, regardless of when/how it's constructed or destroyed.

Re:Move in C++ without a std:move by OskarS on Thursday September 03, 2026 @04:35AM (#49547443)
Fair enough, I don't know the C++ ABI to this extent.