Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/typename16.C

raw
1 // { dg-do link }
2 // { dg-options "-Wno-deprecated" }
3
4 struct B {
5 typedef int I;
6 };
7
8 template <class T>
9 struct D1 : public B {
10 };
11
12 template <class T>
13 struct D2 : public D1<T> {
14 I i; // { dg-error "" } not a type
15 };
16
17 template <>
18 struct D1<int> {
19 typedef double I;
20 };
21
22 template <class T>
23 void f(T);
24 template <>
25 void f(double) {}
26
27 int main()
28 {
29 D2<int> d2i;
30 f(d2i.i); // { dg-error "" } no member i
31 }