// { dg-do compile { target c++11 } } template class A { /* ... */ }; template class B { /* ... */ }; template class C { /* ... */ }; template class P> class X { /* ... */ }; template class Q> class Y { /* ... */ }; X xA; // okay X xB; // { dg-error "mismatch" "mismatch" } // { dg-error "expected a template" "expected" { target *-*-* } 11 } // { dg-error "invalid type" "invalid" { target *-*-* } 11 } X xC; // { dg-error "mismatch" "mismatch" } // { dg-error "expected a template" "expected" { target *-*-* } 14 } // { dg-error "invalid type" "invalid" { target *-*-* } 14 } Y yA; Y yB; Y yC; // okay