Named Return Value Optimization
Explore Named Return Value Optimization in C++17 to understand how modern compilers optimize return values by eliminating unnecessary copies, improving performance, and following new clear rules on object elision.
We'll cover the following...
We'll cover the following...
Compilers and NRVO
Compilers are even smarter, and they can elide in cases when you return a named object - it’s called Named Return Value Optimization - NRVO
...