aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
blob: c27aa8d2df7c8b04b5b8008a59039e8ef56358a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Build don't link:
#include <vector>
#include <algorithm>

template <class T> class Expr
{
public :
Expr(){};
Expr(const T&){};
};

template <class T >
inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };

int main()
{
  std::vector<int>     a(3);
  std::sort( a.begin(), a.end(), compare ); // ERROR - no matching function 
}