public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/6289: partial template specialization and friend Date: Wed, 08 May 2002 04:46:00 -0000 [thread overview] Message-ID: <20020508114605.16325.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/6289; it has been noted by GNATS. From: Nathan Sidwell <nathan@acm.org> To: Reichelt <reichelt@igpm.rwth-aachen.de> 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 <typename T> 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
next reply other threads:[~2002-05-08 11:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-05-08 4:46 Nathan Sidwell [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-05-14 8:10 lerdsuwa 2002-05-08 3:26 Reichelt 2002-05-08 1:46 Wolfgang Bangerth 2002-05-07 15:16 Reichelt 2002-04-13 15:06 jototland
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020508114605.16325.qmail@sources.redhat.com \ --to=nathan@acm.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).