Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++structured bindingsSingle-choice MCQ

What is the lifetime behavior of the hidden object 'e' created when you write `const auto& [a, b] = makePair();` where makePair() returns a prvalue std::pair?

const auto& [a, b] = makePair(); // makePair returns std::pair<int,int> by value