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]

g++ 2.95.2 disallows partially specializated friends


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.

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