// DR 2179 template class A; template struct A { void f(); }; template void g(T) { A().f(); } // #1 template struct A {}; // { dg-error "" } A f; // #2