Add template keyword to <mdspan> for Clang
Tomasz Kaminski
tkaminsk@redhat.com
Mon Jul 7 06:52:44 GMT 2025
Thanks.
I am not sure if template is necessary here, as I believe this is type-only
context, but I never understood the rules around this.
On Sat, Jul 5, 2025 at 1:15 AM Jonathan Wakely <jwakely@redhat.com> wrote:
> Clang wants this change:
>
> --- a/libstdc++-v3/include/std/mdspan
> +++ b/libstdc++-v3/include/std/mdspan
> @@ -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>
>
> to fix:
>
>
> /home/jwakely/gcc/latest/lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../include/c++/16.0.0/mdspan:512:30:
> error: use 'template' keyword to treat 'mapping' a
> s a dependent template name
> 512 | is_same_v<typename _Layout::mapping<typename
> _Mapping::extents_type>,
> | ^
>
>
> I'll push that on Monday.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20250707/39939b19/attachment.htm>
More information about the Libstdc++
mailing list