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

What does this structured binding do, and what is the type of each binding?

struct Point { int x, y; }; Point p{1, 2}; auto& [a, b] = p; a = 99; // p.x is now 99