]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Implement full_extent_t. [PR110352]
authorLuc Grosheintz <luc.grosheintz@gmail.com>
Thu, 2 Oct 2025 09:27:15 +0000 (11:27 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Wed, 8 Oct 2025 10:35:19 +0000 (12:35 +0200)
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.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
libstdc++-v3/include/std/mdspan
libstdc++-v3/src/c++23/std.cc.in

index 7acc232024e902692b751d4133c7be5f54ddb3b4..7f69626e4e86ffff7cda1fa304d57b460a4b6489 100644 (file)
@@ -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
index 8da78fe955b71f93d02c3714b55b6ba5636267a2..bfccf3cec9561664a6b7b555d51c457afa9df403 100644 (file)
@@ -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