This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
eb42.C
- To: egcs-patches at cygnus dot com
- Subject: eb42.C
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Fri, 29 May 1998 00:32:02 +0200
This patch focusses the test case somewhat.
Is the compiler really required to determine the parameter of compare?
Martin
Index: eb42.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C,v
retrieving revision 1.1
diff -c -p -r1.1 eb42.C
*** eb42.C 1998/05/27 23:00:36 1.1
--- eb42.C 1998/05/28 22:27:12
***************
*** 1,4 ****
- #define TEMPLATE 1
#include <vector.h>
#include <algo.h>
--- 1,3 ----
*************** Expr(){};
*** 9,22 ****
Expr(const T&){};
};
- #ifdef TEMPLATE
template <class T >
inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
- #else
- inline bool compare(const Expr<int> a, const Expr<int> b){ return true; };
- #endif
! void main()
{
vector<int> a(3);
sort( a.begin(), a.end(), compare );
--- 8,17 ----
Expr(const T&){};
};
template <class T >
inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
! int main()
{
vector<int> a(3);
sort( a.begin(), a.end(), compare );