Debian Codegraph @

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

raw
1 // { dg-do assemble }
2 // { dg-options "" }
3
4 template <typename T>
5 void f(T);
6 template <>
7 void f(int) {}
8
9 struct B {
10 typedef int I;
11 };
12
13 template <typename T>
14 struct D1 : virtual public B {
15 typedef T I;
16 };
17
18
19 template <typename T>
20 struct D : virtual public B, public D1<T>
21 {
22 void g()
23 {
24 I i;
25 f(i);
26 }
27 };
28
29 int
30 main()
31 {
32 D<double> d;
33 d.g();
34 }
35