News for hackers. Stuff that matters.
Re:Move in C++ without a std:move by leni536 on Wednesday September 02, 2026 @11:15AM (#49537592)
That one is not too hard either. `one` simply can't be NRVO'd as there is a runtime path in scope of it that doesn't return it. `two` can be (unless you hide some other return within ...).
Re:Move in C++ without a std:move by bluGill on Wednesday September 02, 2026 @12:47PM (#49538983)
You can structre the code differently to get around that. There is a real desire to use NRVO "one" in cases when it is returned as well, if possible.