gcc/testsuite/g++.dg/template/partial-specialization13.C
raw| 1 | // PR c++/105425 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<bool> struct when; |
| 5 | template<class, class> struct A; |
| 6 | template<class T, bool K> struct A<T, when<K>>; // #1 |
| 7 | template<class T> struct A<T, when<T(2) == 1>> {}; // #2 |
| 8 | A<int, when<true>> a1; // { dg-error "incomplete" } |
| 9 | A<int, when<false>> a2; |
| 10 | A<bool, when<true>> a3; |
| 11 | A<bool, when<false>> a4; // { dg-error "incomplete" } |