2 ms·
You don’t even get information/ diagnostics about copy elision / return value optimization in c++, if that happened or not in particular place in the code. Onl
by galkk 3y ago
You don’t even get information/ diagnostics about copy elision / return value optimization in c++, if that happened or not in particular place in the code.
Only by looking into assembler :(
- leni536 3y agoNote that RVO is mandatory when returning a prvalue since C++17. IME NRVO happens pretty reliably in the simple case, even on low optimisation levels. There is a proposal for mandatory NRVO in some cases. It would be pretty great, but the proposal didn't move forward for quite a while.