C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Name resolution, Locally declared names.
From: Christof Meerwald (cmeerw_at_[hidden])
Date: 2020-10-17 07:06:03


On Sat, Oct 17, 2020 at 02:35:08PM +0300, Vladimir Grigoriev via Std-Discussion wrote:
> In the paragraph #2 of the section 17.7.1 Locally declared names
> (C++ 17 Standard) there is the following example

In p1 it says "The injected-class-name can be used as a template-name
or a type-name" and in p2 we have "when the injected-class-name is
used as a type-name"

> template<template<class> class T> class A { };
> template<class T> class Y;
> template<> class Y<int> {
>     A<Y>* a; // meaning A<::Y>

"A" expects a template template parameter, so "Y" must be used as a
template-name here.

> In the comments the expression A<::Y> is confusing. Does it mean A<Y<int»

No.

Christof

-- 
http://cmeerw.org                              sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups