// { dg-do compile { target c++11 } } template struct A {}; // { dg-error "must be at the end" } template class U> struct B // { dg-error "must be at the end" } { template U foo(); // { dg-error "mismatch|constant|invalid|invalid" } };