This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
eb44
- To: egcs-patches at cygnus dot com
- Subject: eb44
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 2 Jun 1998 10:11:15 +0200
It is not clear what the error is. As far as I can tell, g++ is right
in calling a function instead of a template specialization. I don't know
how to check for the (good) linker error, so I told it not to link.
Martin
Index: eb44.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C,v
retrieving revision 1.1
diff -c -p -r1.1 eb44.C
*** eb44.C 1998/05/27 23:00:36 1.1
--- eb44.C 1998/06/02 08:02:33
***************
*** 1,4 ****
--- 1,9 ----
// spurious 'const' in error.
+ // Build don't link:
+ // For egcs-2.91.34, the error message refers to
+ // class ostream & operator <<(class ostream &, const class Vector<T> &)
+ // Also, the template instantiation does not provide the missing
+ // friend function
#include <stdio.h>
#include <iostream.h>
***************
*** 6,12 ****
template <class T>
class Vector
{
! friend ostream& operator<< (ostream& out, const Vector<T> & vec);
};
template <class T>
--- 11,17 ----
template <class T>
class Vector
{
! friend ostream& operator<< (ostream& out, const Vector<T> & vec); // ERROR -
};
template <class T>