c++ template class problem
Alexandre Oliva
oliva@dcc.unicamp.br
Fri Sep 25 22:53:00 GMT 1998
Nathan Myers <ncm@cygnus.com> writes:
> Toshinao ISHII wrote:
>> friend ostream& operator << <>( ostream &, const C<T>& );
> And the friend:
> template <class U>
> friend ostream& operator<<( ostream&, const C<U>& );
I'm pretty sure you're well aware that these are not equivalent.
The former declaration refers to a single specialization, whereas the
latter refers to *all* specializations of the template function.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc
mailing list