This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 02:16:44 -0000
- Subject: [Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
- References: <20040130165003.13935.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-02-02 02:16 -------
(In reply to comment #5)
> That is the same thing as for
> struct foo { };
> struct bar {
> foo foo;
> };
I disagree. [class.friend]/1: "The name of a friend is not in the scope of the
class."
> See 3.3.6/1
> [...]
> 2) A name N used in a class S shall refer to the same declaration
> in its context and when reevaluated in the completed scope of
> S. No diagnostic is required for a violation of this rule.
3.3.6 is [basic.class.scope] and 3.3.6/1 begins with: "The following rules
describe the scope of names declared in classes". Given [class.friend]/1, I
don't see how this could apply.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935