#include <iostream>
using namespace std;
class BaseInterface
{ virtual void test()=0; }; // abstract class
class ExtendedInterface : public virtual BaseInterface // virtual inheritance
{}; // abstract class
class Base : public virtual BaseInterface // virtual inheritance
{ void test() override {} }; // concrete class
class Extended : public ExtendedInterface, public Base // multiple
{}; // thanks to virtual inheritance, concerete class
int main() {
Extended e;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgQmFzZUludGVyZmFjZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7IHZpcnR1YWwgdm9pZCB0ZXN0KCk9MDsgfTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhYnN0cmFjdCBjbGFzcwoKY2xhc3MgRXh0ZW5kZWRJbnRlcmZhY2UgOiBwdWJsaWMgdmlydHVhbCBCYXNlSW50ZXJmYWNlICAgLy8gdmlydHVhbCBpbmhlcml0YW5jZQp7fTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhYnN0cmFjdCBjbGFzcwoKY2xhc3MgQmFzZSA6IHB1YmxpYyB2aXJ0dWFsIEJhc2VJbnRlcmZhY2UgICAgICAgICAgICAgICAgLy8gdmlydHVhbCBpbmhlcml0YW5jZQp7IHZvaWQgdGVzdCgpIG92ZXJyaWRlIHt9IH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb25jcmV0ZSBjbGFzcwoKY2xhc3MgRXh0ZW5kZWQgOiBwdWJsaWMgRXh0ZW5kZWRJbnRlcmZhY2UsIHB1YmxpYyBCYXNlICAgLy8gbXVsdGlwbGUgCnt9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhhbmtzIHRvIHZpcnR1YWwgaW5oZXJpdGFuY2UsIGNvbmNlcmV0ZSBjbGFzcyAKCmludCBtYWluKCkgewoJRXh0ZW5kZWQgZTsgCglyZXR1cm4gMDsKfQ==