blob: 4d9044579ca998b3fcb980ad1a9cf0006db01795 [file] [log] [blame]
// PR c++/95158
// { dg-do run }
class Base {
public:
virtual void foo()=0;
};
template <typename T>
class MiddleA : virtual public Base {
public:
virtual void foo() {}
};
class MiddleB : virtual public Base {};
template <typename T>
class Derived : public MiddleA<T>, public MiddleB {
public:
void bar()
{
Derived d;
d.foo();
}
};
int main()
{
Derived<void> a;
a.bar(); // Instantiate the template
}