Structured bindings (C++17) let you unpack pairs and tuples into named variables in one line. For pairs: auto [x, y] = make_pair(1, 2); Now x is 1 and y is 2. For tuples: auto [a, b, c] = make_tuple(1, 2.0, "hi"); Creates three variables.
This works great in for loops: for (auto& [key, value] : myMap) { . } Instead of writing p.first and p.second everywhere, you use meaningful names. Structured bindings make code more readable when working with containers of pairs or when functions return multiple values.
Use them whenever you need to access both parts of a pair.