P2906R2 — Structured bindings for std::extents
Bernhard Manfred Gruber, Yihan Wang, Mark Hoemmen
LEWG
Revisions R2Jul 2026R1May 2026
[[P0009R18]](https://wg21.link/p0009r18) proposed `std::mdspan`, which was approved for C++23. It comes with the utility class template `std::extents` to describe the integral extents of a multidimensional index space. Practically, `std::extents` models an array of integrals, where some of the values can be specified at compile-time. However, `std::extents` behaves very little like an array. A notable missing feature are structured bindings, which would come in handy if the extents of the individual dimensions need to be extracted: