https://gcc.gnu.org/g:4d24612a2e453aa4755821a4d168bbc338a20036

commit r16-2153-g4d24612a2e453aa4755821a4d168bbc338a20036
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Jul 8 22:04:29 2025 +0100

    libstdc++: Add more template keywords to <mdspan> for Clang
    
    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.

Diff:
---
 libstdc++-v3/include/std/mdspan | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
index 5d16de5d9072..b34116a85e67 100644
--- a/libstdc++-v3/include/std/mdspan
+++ b/libstdc++-v3/include/std/mdspan
@@ -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)

Reply via email to