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: 30 Jan 2004 17:58:02 -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-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