gcc/testsuite/g++.dg/template/partial17.C
raw| 1 | // [temp.spec.partial.match]/3 |
| 2 | |
| 3 | template <int I, int J> struct A; |
| 4 | template <int I> struct A<I+5, I*2> {}; // { dg-error "not deducible" } |
| 5 | |
| 6 | template <int I> struct A<I, I> {}; // OK |
| 7 | |
| 8 | template <int I, int J, int K> struct B; |
| 9 | template <int I> struct B<I, I*2, I> {}; // OK |
| 10 | template <int I> struct B<I, I*2, 2> { typedef int type; }; // OK |
| 11 | |
| 12 | B<1, 2, 1> b1; |
| 13 | B<1, 2, 2>::type b2; |
| 14 | B<1, 2, 3> b3; // { dg-error "incomplete" } |