This is the mail archive of the gcc-patches@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]

eb42.C


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 );


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