Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/bad-type.C

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