From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30841 invoked by alias); 18 Jul 2002 13:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30827 invoked by uid 71); 18 Jul 2002 13:16:01 -0000 Date: Thu, 18 Jul 2002 06:16:00 -0000 Message-ID: <20020718131601.30826.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Kriang Lerdsuwanakij Subject: Re: c++/7301: template template parameters are not correctly parsed when using 'typename' Reply-To: Kriang Lerdsuwanakij X-SW-Source: 2002-07/txt/msg00547.txt.bz2 List-Id: The following reply was made to PR c++/7301; it has been noted by GNATS. From: Kriang Lerdsuwanakij To: Thomas Mang , 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