1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// { dg-do assemble } template<class Type> class A { public: Type m; }; template<class Type> void f(A<Type>& a, Type d) { A.m=d; // { dg-error "" } invalid use of template } int main() { A<int> a; f(a,2); }