summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/overload2.C
blob: 88fe0a218642a5aa76c99c0578119e5c5aa97eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// { dg-do link  }

template <class T>
class ConstArray {
};

template <class T1, class T2>
void operator+(const ConstArray<T1>&, const ConstArray<T2>&)
{
}

template <class T1, class T2>
void operator+(const ConstArray<T1>&, T2);

template <class T1, class T2>
void operator+(T1, const ConstArray<T2>&);

const ConstArray<int> cai() { return ConstArray<int>(); }
const ConstArray<double> cad() { return ConstArray<double>(); }

int main()
{
  cai () + cad ();
}