Hi, Thank you for the patches.
On patch 3 I have suggested a different approach for determining what kind of mapping we want, padded or not padded, and stopped the review there. I think I will also test the test tomorrow, and maybe see if I have other comments for patches outside of this partch. Let's iterate a bit on code snippets there before new submission of the whole series. I will also push patch 1, with one change I have suggested. Regards, Tomasz On Thu, Nov 20, 2025 at 4:39 PM Tomasz Kaminski <[email protected]> wrote: > General comments, I may not have noticed this in previous patches, > but any calls to functions needs to qualified, with either std:: or > __mdspan::, > to avoid finding overloads by ADL. > > On Tue, Nov 18, 2025 at 3:26 PM Luc Grosheintz <[email protected]> > wrote: > >> This sequence of patches implements submdspan and as far as I'm aware >> completes the C++26 header <mdspan>. >> >> The first commit is preparatory (move code, generalize code >> and fix some formatting issues). Then, each commit implements: >> >> - submdspan_canonicalize_slices, >> - submdspan_extents (with review comments on previous patch), >> - submdspan_mapping: for each layout, >> - remove internal FTM __glibcxx_padded_layouts, >> - set __cpp_lib_submdspan to mark completion of submdspan. >> >> Important changes since v1: >> >> - removed use of `constexpr auto [...i] = _IotaArray` for >> compatibility with clang. >> >> Luc Grosheintz (10): >> libstdc++: Prepare mdspan-related code for submdspan. >> libstdc++: Implement submdspan_canonicalize_slices. [PR110352] >> libstdc++: Implement submdspan_extents. [PR110352] >> libstdc++: Implement submdspan and submdspan_mapping for layout_left. >> [PR110352] >> libstdc++: Implement submdspan_mapping for layout_right. [PR110352] >> libstdc++: Implement submdspan_mapping for layout_stride. [PR110352] >> libstdc++: Implement submdspan_mapping for layout_left_padded. >> [PR110352] >> libstdc++: Implement submdspan_mapping for layout_right_padded. >> [PR110352] >> libstdc++: remove __glibcxx_padded_layouts. >> libstdc++: Set __cpp_lib_submdspan to 202411. >> >> libstdc++-v3/include/bits/version.def | 14 +- >> libstdc++-v3/include/bits/version.h | 14 +- >> libstdc++-v3/include/std/mdspan | 953 +++++++++++++++++- >> libstdc++-v3/src/c++23/std.cc.in | 6 +- >> .../testsuite/23_containers/mdspan/int_like.h | 34 +- >> .../padded_traits.h => layout_traits.h} | 69 +- >> .../23_containers/mdspan/layouts/ctors.cc | 2 +- >> .../23_containers/mdspan/layouts/mapping.cc | 2 +- >> .../23_containers/mdspan/layouts/padded.cc | 2 +- >> .../mdspan/layouts/padded_neg.cc | 2 +- >> .../mdspan/submdspan/submdspan.cc | 377 +++++++ >> .../submdspan_canonicalize_slices.cc | 212 ++++ >> .../submdspan_canonicalize_slices_neg.cc | 208 ++++ >> .../mdspan/submdspan/submdspan_extents.cc | 169 ++++ >> .../mdspan/submdspan/submdspan_extents_neg.cc | 48 + >> .../mdspan/submdspan/submdspan_mapping.cc | 301 ++++++ >> .../mdspan/submdspan/submdspan_neg.cc | 120 +++ >> 17 files changed, 2453 insertions(+), 80 deletions(-) >> rename >> libstdc++-v3/testsuite/23_containers/mdspan/{layouts/padded_traits.h => >> layout_traits.h} (67%) >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_canonicalize_slices.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_canonicalize_slices_neg.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_extents.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_extents_neg.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_mapping.cc >> create mode 100644 >> libstdc++-v3/testsuite/23_containers/mdspan/submdspan/submdspan_neg.cc >> >> -- >> 2.51.2 >> >>
