OSDN Git Service

update
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb43.C
1 // excess errors test - XFAIL *-*-*
2
3 #include <vector.h>
4 #include <algo.h>
5
6 template <class T> class Expr 
7 {
8 public :
9   Expr(){};
10   Expr(const T&){};
11 };
12
13 template <class T >
14 inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
15
16 void main()
17 {
18   vector<int>   a(3);
19   sort( a.begin(), a.end(),
20         static_cast<bool (*)(const Expr<int>,const Expr<int>)>(compare) );
21   sort( a.begin(), a.end(), compare<int> );
22   sort<vector<int>::iterator,
23        pointer_to_binary_function<const Expr<int>, const Expr<int>, bool> >
24     ( a.begin(), a.end(), compare );
25   sort( a.begin(), a.end(),
26         ptr_fun<const Expr<int>, const Expr<int>, bool> (compare) );
27   sort( a.begin(), a.end(),
28         ptr_fun(compare<int>) );
29   sort( a.begin(), a.end(),
30         pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare) );
31   sort( a.begin(), a.end(),
32         pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare<int>) );
33   sort( a.begin(), a.end(),
34         pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare<>) );
35 }