This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]