template friends

Alexandre Oliva oliva@dcc.unicamp.br
Sat May 2 01:23:00 GMT 1998


Stefan Schwarzer <sts@ica1.uni-stuttgart.de> writes:

> according to 14.5.3 (1 and 2, temp.friend) one should be able to
> declare a function template as friend of a template (1) or
> non-template class (2).

That's correct, but the syntax for that is not the one suggested in
the Nov'96 CD.  The FDIS states that, in order to declare a
specialization of a template function a friend, the function name must
be followed by template parameters between angle brackets, even if the
argument list is empty (all arguments can be deduced).  If no template 
parameters are provided, a non-template function is assumed.

-- 
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-bugs mailing list