[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Fri Jan 30 17:58:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-01-30 17:58 -------
Well, when I say:
friend class B;
I'm saying that ::B is a friend of MainClass<> (and ::B is thus predeclared).
Then, I'm defining MainClass<>::B<>, which is a totally unrelated type. I don't
see how this could be illegal.
I think the crucial point is about this:
template < class TP2 > friend class B;
Does this refer to ::B or to MainClass<>::B<>? How is the lookup performed,
exactly? There are a couple of DR in TC1 about name lookup issues of friend
templates, I'll give them a deeper look.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935
More information about the Gcc-bugs
mailing list