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

Why does this attempt to use a structured binding inside a lambda capture fail to compile in C++17?

auto t = std::make_tuple(1, 2); auto [a, b] = t; auto f = [a]() { return a; }; // C++17