Skip to content

Glossary: Algorithms Beyond the Basics in C++

auto [a, b] (structured binding)

Also written: structured binding, structured bindings, auto [best, start]

C++ syntax that unpacks a pair, tuple or struct into separate named variables in one line, such as `auto [value, chosen] = knapsack(...)`.

Where the book teaches it

Related terms

std::pairstd::tuple