From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16368 invoked by alias); 8 May 2002 11:46:08 -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 16330 invoked by uid 71); 8 May 2002 11:46:05 -0000 Date: Wed, 08 May 2002 04:46:00 -0000 Message-ID: <20020508114605.16325.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nathan Sidwell Subject: Re: c++/6289: partial template specialization and friend Reply-To: Nathan Sidwell X-SW-Source: 2002-05/txt/msg00228.txt.bz2 List-Id: The following reply was made to PR c++/6289; it has been noted by GNATS. From: Nathan Sidwell To: Reichelt Cc: gcc-gnats@gcc.gnu.org, jototland@hotmail.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, bangerth@math.ethz.ch Subject: Re: c++/6289: partial template specialization and friend Date: Wed, 08 May 2002 12:34:04 +0100 Reichelt wrote: > > Hi, > > here's an even shorter example: > > ---------------------------snip here-------------------------- > template class B > { > typedef int X; > friend class X; > }; > ---------------------------snip here-------------------------- > > This is in fact legal code (and is accepted by SGI's and Comeau's > compiler for example). It would be illegal, if the friend declaration no it is ill formed. [7.1.5.3]/2 says if the identifier resolves to a typedef name, or a template type-parameter, the elaborated type specifier is ill-formed. nathan -- Dr Nathan Sidwell :: Computer Science Department :: Bristol University The voices in my head told me to say this nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk