[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Fri Jan 30 17:45:00 GMT 2004
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-30 17:45 -------
Subject: Re: [3.4/3.5 Regression] Template friend lookup bug
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| It fails with the same error on 3.3.3-pre.
|
| However, I'm not sure whether this is not illegal: you first say
| friend class B;
| but then you declare B as a template:
| template <typename TP2> class B
| What confuses me is that this is not detected.
You're right in thinking that the program is invalid. Indeed it is.
A template-name ought to designate a unique entity in a given
declarative region, e.g. there is no "struct hack" for template
names. Same for namespace names. And that is Good!
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935
More information about the Gcc-bugs
mailing list