[PATCH v1 2/4] libstdc++: Implement full_extent_t. [PR110352]
Tomasz Kaminski
tkaminsk@redhat.com
Fri Oct 3 10:29:00 GMT 2025
On Thu, Oct 2, 2025 at 11:29 AM Luc Grosheintz <luc.grosheintz@gmail.com>
wrote:
> Add the class and updates the std module.
>
> PR libstdc++/110352
>
> libstdc++-v3/ChangeLog:
>
> * include/std/mdspan (full_extent_t): New class.
> * src/c++23/std.cc.in (full_extent_t): Add.
>
> Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
> ---
>
LGTM.
> libstdc++-v3/include/std/mdspan | 7 +++++++
> libstdc++-v3/src/c++23/std.cc.in | 5 +++--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/libstdc++-v3/include/std/mdspan
> b/libstdc++-v3/include/std/mdspan
> index 4828806d817..00bb9716a9d 100644
> --- a/libstdc++-v3/include/std/mdspan
> +++ b/libstdc++-v3/include/std/mdspan
> @@ -337,6 +337,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> }
>
> #if __glibcxx_submdspan
> + struct full_extent_t
> + {
> + explicit full_extent_t() = default;
> + };
> +
> + inline constexpr full_extent_t full_extent{};
> +
> template<typename _OffsetType, typename _ExtentType, typename
> _StrideType>
> struct strided_slice {
> static_assert(__is_standard_integer<_OffsetType>::value
> diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/
> std.cc.in
> index 8da78fe955b..bfccf3cec95 100644
> --- a/libstdc++-v3/src/c++23/std.cc.in
> +++ b/libstdc++-v3/src/c++23/std.cc.in
> @@ -1873,9 +1873,10 @@ export namespace std
> using std::layout_left_padded;
> using std::layout_right_padded;
> using strided_slice;
> + using full_extent_t;
> + using full_extent;
> #endif
> - // FIXME submdspan_mapping_result, full_extent_t, full_extent,
> - // submdspan_extents, mdsubspan
> + // FIXME submdspan_mapping_result, submdspan_extents, mdsubspan
> }
> #endif
>
> --
> 2.50.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20251003/5dc79e65/attachment.htm>
More information about the Libstdc++
mailing list