Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++copy elision RVO NRVOSingle-choice MCQ

Why does NRVO typically fail to apply in this function, even though a named local is returned?

struct Big { /* ... */ }; Big pick(bool b) { Big x, y; if (b) return x; return y; }