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

Under guaranteed copy elision (C++17), which of these involves NO copy/move and requires no accessible copy/move constructor, and which still merely allows (NRVO) but does not mandate elision?

struct T { T(); T(const T&) = delete; T(T&&) = delete; }; T make() { return T{}; } // case 1 T makeN() { T t; return t; } // case 2