PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / parse / template25.C
blob03017ab3a636cc7f0a575eb76a0c7ea9bcf47ac2
1 // PR c++/22318. Improve diagnostic for local template declaration.
2 // { dg-do compile }
3 void f(void)
5   template<typename T> class A /* { dg-error "a template declaration cannot appear at block scope" } */
6   {
7   };
10 void g(void)
12   template f<int>(); /* { dg-error "expected primary-expression" "primary-expression" } */