This is the second iteration of this patch series and the first also sent to gcc-patches.
The individual patches can be restructured as desired. The final patch is a proposal to strengthen some exception guarantees to make mdspan nothrow movable. The standard doesn't require this; but I felt it made sense to at least propose it. Luc Grosheintz (5): libstdc++: Check prerequisites of layout_*::operator(). libstdc++: Check prerequite of extents::extents. libstdc++: Restructure mdspan tests to reuse IntLike. libstdc++: Implement mdspan and tests. libstdc++: Make mdspan nothrow movable. libstdc++-v3/include/std/mdspan | 305 +++++++++ libstdc++-v3/src/c++23/std.cc.in | 3 +- .../23_containers/mdspan/class_mandate_neg.cc | 58 ++ .../mdspan/extents/class_mandates_neg.cc | 31 + .../mdspan/extents/custom_integer.cc | 27 +- .../23_containers/mdspan/extents/int_like.h | 28 + .../23_containers/mdspan/layout_like.h | 63 ++ .../mdspan/layouts/class_mandate_neg.cc | 26 + .../testsuite/23_containers/mdspan/mdspan.cc | 591 ++++++++++++++++++ 9 files changed, 1105 insertions(+), 27 deletions(-) create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/class_mandate_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/extents/int_like.h create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/layout_like.h create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc -- 2.49.0