summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/overload12.C
blob: 9da3d32e2f851f8a2559443b2e1661e613f795b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do run  }
// Testcase for not trying a candidate that would generate an ill-formed
// instantiation.

template <int N> struct A {
  int ar[N];
};

template <int N> struct B {
  B () { }
  B (const A<N> &) { }
  B (const A<N-1> &, int);
};

int
main ()
{
  A<1> a;
  B<1> b1;
  B<1> b2 (a);
}