[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Mon Feb 2 02:16:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list