Template problem on DEC Alpha
Alexandre Oliva
oliva@dcc.unicamp.br
Tue Oct 6 11:49:00 GMT 1998
Martin Habbecke <M.Habbecke@fz-juelich.de> writes:
> template<class T> class Base {
> friend ostream& operator << <>(ostream&, const Base<T>& );
> };
> /* Funktion causing trouble... */
> ostream& operator<<(ostream& os, const Base<double>& bs)
This is not a specialization of the template function; you're just
overloading it. What you want is:
template <>
ostream& operator<<(ostream& os, const Base<double>& bs)
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list