C++ Logo

std-discussion

Advanced search

Re: Is a template parameter a typedef name

From: Sean Mayard <seanmayard_at_[hidden]>
Date: Mon, 5 Feb 2024 20:31:16 +0530
Thanks for clearing that up for me.

Regards,

On Mon, 5 Feb 2024 at 17:37, Daniel Krügler <daniel.kruegler_at_[hidden]>
wrote:

> Am Mo., 5. Feb. 2024 um 13:03 Uhr schrieb Sean Mayard via
> Std-Discussion <std-discussion_at_[hidden]>:
> >
> > Hi I've a doubt in typedef name. In particular, say we have a class
> template C as shown below. My question is `T` in the following example a
> typedef-name? I tried reading dcl.typedef but I couldn't pinpoint if that
> make T typedef-name.
> >
> > template<typename T> struct C
> > {
> > //is T a typedef-name here?
> > };
> >
> > Can someone tell me which clause makes T a typedef-name?
> >
> > Regards,
> >
> > --
>
> [temp.param] p3 says:
>
> "The identifier in a type-parameter is not looked up. A type-parameter
> whose identifier does not follow an
> ellipsis defines its identifier to be a typedef-name (if declared
> without template) or template-name (if declared
> with template) in the scope of the template declaration."
>
> - Daniel
>

Received on 2024-02-05 15:01:30