friend template class

Christian Kueblbeck kue@iis.fhg.de
Thu Oct 29 01:09:00 GMT 1998


The following piece of code does not compile:

template <class T> class Test
{
     friend class Friend<T>;
};

g++ 2.7.1 compiles without warning (as well as MS Visual C++), but egcs
says:

parse error before `<'

How else should I declare friend template class?

Can anyone help me?




More information about the Gcc mailing list