This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7301: template template parameters are not correctly parsed when using 'typename'
- From: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 18 Jul 2002 13:16:01 -0000
- Subject: Re: c++/7301: template template parameters are not correctly parsed when using 'typename'
- Reply-to: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
The following reply was made to PR c++/7301; it has been noted by GNATS.
From: Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
To: Thomas Mang <a9804814@unet.univie.ac.at>, lerdsuwa@gcc.gnu.org,
a9804814@unet.univie.ac.at, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c++/7301: template template parameters are not correctly
parsed when using 'typename'
Date: Thu, 18 Jul 2002 20:12:21 +0700
Check out the language grammar, either from the standard or
say The C++ Programming 3rd Ed or special Ed. Only 'class'
is allowed in the grammar. The idea is with template type parameter,
you can substitute it with any type such as 'int', etc. So using 'class'
there seems like it's restricted to class types, not any type like
'typename'.
But with template template parameter, you can only substitute it with a
template class.
--Kriang
At 11:15 17/7/02 +0200, Thomas Mang wrote:
>Lots of greetings,
>
>Well, but isn't a template template parameter a special case of a template
>parameter(one, where the templated type is itself a template)?
>
>To use a metaphor, I think a 'template parameter' could be a base class,
>and a 'template template parameter' would be a derived class.
>After all, template template parameters rely on template parameters (to
>instantiate the template template parameter).
>
>And as 'typename' and 'class' can be used interchangeable with template
>parameters, my (doubtless) point - of - view is they should be also able
>to be used interchangeably with template template parameters.
>
>
>best regards
>
>Thomas
>
>
>
>
>lerdsuwa@gcc.gnu.org schrieb:
>>Synopsis: template template parameters are not correctly parsed when
>>using 'typename'
>>
>>State-Changed-From-To: open->closed
>>State-Changed-By: lerdsuwa
>>State-Changed-When: Sun Jul 14 08:20:06 2002
>>State-Changed-Why:
>> Not a bug. 'typename' and 'class' can be interchanged only
>> for template type parameters, not template template parameters.
>>
>><http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7301>http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7301