]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Make <mdspan> compatible with clang.
authorLuc Grosheintz <luc.grosheintz@gmail.com>
Fri, 12 Dec 2025 11:28:01 +0000 (12:28 +0100)
committerTomasz Kamiński <tkaminsk@redhat.com>
Fri, 12 Dec 2025 19:22:17 +0000 (20:22 +0100)
The submdspan feature broke compatibility with clang, due to a missing
'::template type'.

libstdc++-v3/ChangeLog:

* include/std/mdspan (submdspan): Fix missing '::template'.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
libstdc++-v3/include/std/mdspan

index dc0aa4f9584fd217a5494368a997d00ac236a25c..cedf597d3c2693b78b59c29adcf6fc0071906384 100644 (file)
@@ -3376,7 +3376,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _ElementType, typename _Extents, typename _Layout,
           typename _Accessor, typename... _RawSlices>
     requires (sizeof...(_RawSlices) == _Extents::rank()
-       && __mdspan::__sliceable_mapping<typename _Layout::mapping<_Extents>,
+       && __mdspan::__sliceable_mapping<typename _Layout::template mapping<_Extents>,
                                         __mdspan::__full_extent_t<_RawSlices>...>)
     constexpr auto
     submdspan(