This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with templates and friends functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]