I have tested both patches on x86_64-linux
and powerpc64le-unknown-linux-gnu locally,
and everything passed.
OK for trunk?

On Mon, Sep 29, 2025 at 8:03 AM Luc Grosheintz <[email protected]>
wrote:

> Changes since v3:
>   - Improve comments in version.def
>   - Avoid check statically asserted preconditions:
>     + layout_left::mapping(LeftPaddedMapping)
>     + layout_right::mapping(RightPaddedMapping)
>     + _PaddedStorage(const _Extents&)
>     + _PaddedStorage(const _LayoutSame&)
>     + _PaddedStorage(const layout_stride&)
>     + _PaddedStorage(const SamePaddedMapping&)
>
>   - Use `constexpr static const size_t` in traits.
>   - Reduce constraints in _PaddedStorage.
>   - Use tag-types to completely eliminate constraints in _PaddedStorage;
> and
>     simplify the traits.
>   - Rename and inline:
>     + _S_static_padextent
>     + _M_padextent
>     + _M_padstride
>
>   - Introduce __index_type_cast that checks the representability
>     and non-negativity conditions, and casts to index_type.
>   - Simplify reverse.
>   - Lift operator== to _PaddedStorage (as _M_equal).
>   - Restructure __valid_padded_size to use _S_static_padextent.
>   - Move is_padded_layout from ctors.cc to padded_traits.h
>   - Eliminate _S_static_stride in the userfacing mappings.
>   - Also make the multi arg ctor explicit.
>   - Flatten else { if ... }.
>   - Use __cplusplus > 202302L in tests.
>   - Restructure _M_required_span_size
>   - Add error message to a static_assert.
>   - Move checking if static padding values are representable up.
>   - Remove unneeded member initilizer in _PaddedStorage.
>   - Fix formatting and whitespace.
>
> Not strictly requested changes:
>
>   - When checking __valid_padded_size, use the fact that we
>   can't handle index_type >= size_t. Therefore, only check if the padded
>   size fits into index_type.
>
>   - Include the bugzilla issue number in the commit messages.
>   - Remove stray #include <iostream>
>   - Rename make_expected to make_array.
>
> Luc Grosheintz (2):
>   libstdc++: Implement std::layout_left_padded [PR110352].
>   libstdc++: Implement layout_right_padded [PR110352].
>
>  libstdc++-v3/include/bits/version.def         |  10 +
>  libstdc++-v3/include/bits/version.h           |   9 +
>  libstdc++-v3/include/std/mdspan               | 903 +++++++++++++++++-
>  libstdc++-v3/src/c++23/std.cc.in              |   9 +-
>  .../mdspan/layouts/class_mandate_neg.cc       |   1 +
>  .../23_containers/mdspan/layouts/ctors.cc     |  60 +-
>  .../23_containers/mdspan/layouts/empty.cc     |  21 +-
>  .../23_containers/mdspan/layouts/mapping.cc   | 109 ++-
>  .../23_containers/mdspan/layouts/padded.cc    | 677 +++++++++++++
>  .../mdspan/layouts/padded_neg.cc              | 352 +++++++
>  .../mdspan/layouts/padded_traits.h            | 149 +++
>  11 files changed, 2283 insertions(+), 17 deletions(-)
>  create mode 100644
> libstdc++-v3/testsuite/23_containers/mdspan/layouts/padded.cc
>  create mode 100644
> libstdc++-v3/testsuite/23_containers/mdspan/layouts/padded_neg.cc
>  create mode 100644
> libstdc++-v3/testsuite/23_containers/mdspan/layouts/padded_traits.h
>
> --
> 2.50.1
>
>

Reply via email to