aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/derived2.C
blob: 7335369a23875017ee00fe4e011288b63d18d838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// { dg-do assemble  }
// { dg-options "" }

template <typename T>
void f(T);
template <>
void f(int) {}

struct B {
  typedef int I;
};

template <typename T> 
struct D1 : virtual public B {
  typedef T I;
};


template <typename T> 
struct D : virtual public B, public D1<T>
{
  void g()
    {
      I i;
      f(i);
    }
};

int
main()
{
  D<double> d;
  d.g();
}