gcc/testsuite/g++.dg/template/crash11.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: [email protected] |
| 4 | |
| 5 | // PR c++/7939: ICE for invalid function parameter after template |
| 6 | // substitution. |
| 7 | |
| 8 | template <class T, class U> void foo(T, U) {} |
| 9 | template <class T> void foo<T,void>(T, void) {} // { dg-error "40:invalid use of type .void." } |
| 10 | // { dg-error "25:non-class, non-variable partial specialization" "" { target c++14 } .-1 } |
| 11 | // { dg-error "25:non-type partial specialization" "" { target c++11_down } .-2 } |