summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload.C
blob: 6a747ff96631c3d9dfa01e2bed7a1474b3c3a979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// GROUPS passed overloading
enum bar {};

void operator+ (int, int);// { dg-error "" } .*
void operator+ (bar&, int);

template <class T> void operator+ (int b, T& t) { return b; }
void operator+ (int, bar&);

template <class T> class foo
{
public:
  friend void operator+ <> (int, T&);
};

class baz;

class foo<int>;
class foo<baz>;