This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with templates and friends functions
- To: egcs at egcs dot cygnus dot com
- Subject: Re: Problem with templates and friends functions
- From: Alejandro F Frangi <alex at isi dot uu dot nl>
- Date: Tue, 19 Jan 1999 11:29:10 +0100
- Organization: Image Sciences Institute
- References: <36A4540E.43799BC5@isi.uu.nl>
More info:
The results I reported previously were with egcs-2.91.60. I
also tried the same code on a linux system with a previous
snapshot of egcs (2.91.57) and the same code generated a
warning that did not generate on the SGI system.
The warning indicated that the declaration of the friend
function should be
> friend ostream & operator<< <>(ostream &, const A<T> &);
!!!!!
For the rest the compilation and linkung went OK in Linux.
Applying the same change in the code running under SGI with
egcs-2.91.60 I could now compile/link the test program.
Does anyone understand this behaviour??? I still don't get
why the return type is not recognized without this
modification and how could I achieve good results avoiding
to modify the whole library syntax.
Regards,
Theo and Alex