summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/virtual7.C
blob: 61f17fe63952ba602c9d2b05aae43e1b70888ba6 (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
// Origin: PR c++/47666
// { dg-do compile }

template <typename T>
struct A
{
  int a;
};

template <typename T>
struct B : public A <T>
{
};

class D : public B <D *>
{
  virtual D & operator= (const D &);
};

class E : virtual public D
{
};

class F : public E
{
  virtual void foo ();
};