This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ 2.95.2 disallows partially specializated friends
- To: "gcc bug list" <gcc-bugs at gcc dot gnu dot org>
- Subject: g++ 2.95.2 disallows partially specializated friends
- From: " " <sebor at my-Deja dot com>
- Date: Tue, 21 Mar 2000 10:14:25 -0800
- Cc: "John Pedretti" <pedretti at roguewave dot com>
- Organization: My Deja Email (http://www.my-deja.com:80)
Hi,
g++ 2.95.s rejects friend declarations of partial class specializations. I don't see anything in 14.5.3 that disallows this (14.5.3, p1 says that "A friend of a class or class template can be ... a specialization of a ... class template ...") - is this an unimplemented feature, a bug, or have I missed something? (Other conforming compilers such as edg 2.42 or HP aCC 3.14.10 accept the code.)
This is an issue in Rogue Wave's implementation of vector<bool>.
Thanks
Martin
$ cat test.cpp
template <class T, class U>
struct A;
template <class T>
struct A<int, T>
{
class B {
friend struct A;
};
};
$ g++ test.cpp
test.cpp:11: partial specialization `A<int,T>' declared `friend'
--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.