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

Given the code, with mandatory copy elision in C++17, how many times does the `Tracer` constructor body for the *value-initialized temporary* run, and what is the key reason?

struct Tracer { Tracer(){ /*...*/ } Tracer(const Tracer&)=delete; }; Tracer make(){ return Tracer{}; } // prvalue Tracer t = make(); // still compiles?