]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add more template keywords to <mdspan> for Clang
authorJonathan Wakely <jwakely@redhat.com>
Tue, 8 Jul 2025 21:04:29 +0000 (22:04 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 9 Jul 2025 16:56:22 +0000 (17:56 +0100)
This fixes:

include/c++/16.0.0/mdspan:1182:33: error: use 'template' keyword to treat 'mapping' as a dependent template name
 1182 |               const typename _OLayout::mapping<_OExtents>&>
      |                                        ^
include/c++/16.0.0/mdspan:1185:31: error: use 'template' keyword to treat 'mapping' as a dependent template name
 1185 |             const typename _OLayout::mapping<_OExtents>&, mapping_type>
      |                                      ^

libstdc++-v3/ChangeLog:

* include/std/mdspan (mdspan): Add template keyword for
dependent name.

libstdc++-v3/include/std/mdspan

index 5d16de5d907289abc2198fb4f68898c50a4b032e..b34116a85e676fb3db1741ab991b89087035a343 100644 (file)
@@ -1179,10 +1179,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       template<typename _OElementType, typename _OExtents, typename _OLayout,
               typename _OAccessor>
        requires is_constructible_v<mapping_type,
-             const typename _OLayout::mapping<_OExtents>&>
+             const typename _OLayout::template mapping<_OExtents>&>
          && is_constructible_v<accessor_type, const _OAccessor&>
        constexpr explicit(!is_convertible_v<
-           const typename _OLayout::mapping<_OExtents>&, mapping_type>
+           const typename _OLayout::template mapping<_OExtents>&, mapping_type>
          || !is_convertible_v<const _OAccessor&, accessor_type>)
        mdspan(const mdspan<_OElementType, _OExtents, _OLayout, _OAccessor>&
                 __other)