blob: 03017ab3a636cc7f0a575eb76a0c7ea9bcf47ac2 [file] [log] [blame]
// PR c++/22318. Improve diagnostic for local template declaration.
// { dg-do compile }
void f(void)
{
template<typename T> class A /* { dg-error "a template declaration cannot appear at block scope" } */
{
};
}
void g(void)
{
template f<int>(); /* { dg-error "expected primary-expression" "primary-expression" } */
}