]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Use template keyword in __mapping_of alias template
authorJonathan Wakely <jwakely@redhat.com>
Mon, 7 Jul 2025 10:32:48 +0000 (11:32 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 7 Jul 2025 20:50:50 +0000 (21:50 +0100)
This is needed to fix an error with Clang 19:

include/c++/16.0.0/mdspan:512:30: error: use 'template' keyword to treat 'mapping' as a dependent template name
 512 |         is_same_v<typename _Layout::mapping<typename _Mapping::extents_type>,
     |                                     ^

libstdc++-v3/ChangeLog:

* include/std/mdspan (__mapping_of): Add template keyword.

libstdc++-v3/include/std/mdspan

index c72a64094b73ea9173384509db47c853eaf67e3f..4a06fb2d3a868d87f8ee7b107d431be21d309730 100644 (file)
@@ -509,7 +509,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     template<typename _Layout, typename _Mapping>
       concept __mapping_of =
-       is_same_v<typename _Layout::mapping<typename _Mapping::extents_type>,
+       is_same_v<typename _Layout::template mapping<typename _Mapping::extents_type>,
                  _Mapping>;
 
     template<typename _Mapping>