OSDN Git Service

2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / overload12.C
1 // Testcase for not trying a candidate that would generate an ill-formed
2 // instantiation.
3
4 template <int N> struct A {
5   int ar[N];
6 };
7
8 template <int N> struct B {
9   B () { };
10   B (const A<N> &) { };
11   B (const A<N-1> &, int);
12 };
13
14 int
15 main ()
16 {
17   A<1> a;
18   B<1> b1;
19   B<1> b2 (a);
20 }
21