This follows up on: https://gcc.gnu.org/pipermail/libstdc++/2025-May/061459.html
The changes are: * Fix layout_stride::strides; and add tests. * Add accessors for ranges of static and dynamic extents. * Use them to implement __fwd_prod and __rev_prod. * Remove public members with protected names from extents, by using friends and the accessors instead. * Reduce runtime cost of __is_representable_extents by separating static and dynamic extents. * Remove __layout_extents. * Move private ctors to bottom of class and directly initialize _M_extents. * Implement precondition in layout_{left,right}(layout_stride) using `*this == __other`. * Twice: Use lambda instead of *_impl function. * Various smaller improvements to the tests. Luc Grosheintz (6): libstdc++: Implement layout_left from mdspan. libstdc++: Add tests for layout_left. libstdc++: Implement layout_right from mdspan. libstdc++: Add tests for layout_right. libstdc++: Implement layout_stride from mdspan. libstdc++: Add tests for layout_stride. libstdc++-v3/include/std/mdspan | 670 +++++++++++++++++- .../mdspan/layouts/class_mandate_neg.cc | 42 ++ .../23_containers/mdspan/layouts/ctors.cc | 401 +++++++++++ .../23_containers/mdspan/layouts/mapping.cc | 569 +++++++++++++++ .../23_containers/mdspan/layouts/stride.cc | 494 +++++++++++++ 5 files changed, 2175 insertions(+), 1 deletion(-) create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/layouts/ctors.cc create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/layouts/mapping.cc create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/layouts/stride.cc -- 2.49.0