gcc/testsuite/g++.dg/cpp1y/auto-neg1.C
raw| 1 | // PR c++/60312 |
| 2 | // { dg-do compile { target c++14 } } |
| 3 | |
| 4 | template<typename> struct A; |
| 5 | |
| 6 | template<> struct A<auto> // { dg-error "auto|template argument" } |
| 7 | { |
| 8 | template<int> void foo(); |
| 9 | }; |
| 10 | |
| 11 | void bar() |
| 12 | { |
| 13 | A<auto>().foo<0>(); // { dg-error "auto|template argument" } |
| 14 | } |
| 15 | |
| 16 | // { dg-prune-output "expected" } |