#include <iostream>
struct A
{
A() = delete;
A(int x)
: x(x)
{
}
virtual ~A() = 0;
int x;
};
A::~A() = default;
struct B : virtual A
{
B()
: A(-1)
{
}
virtual ~B() = 0;
};
B::~B() = default;
struct C : B
{
C()
: A(7)
, B()
{
}
};
int main()
{
C c;
std::cout << c.x << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEEKewoJQSgpID0gZGVsZXRlOwoJQShpbnQgeCkKCTogeCh4KQoJewoJfQoJdmlydHVhbCB+QSgpID0gMDsKCWludCB4Owp9OwpBOjp+QSgpID0gZGVmYXVsdDsKCnN0cnVjdCBCIDogdmlydHVhbCBBCnsKCUIoKQoJOiBBKC0xKQoJewoJfQoJdmlydHVhbCB+QigpID0gMDsKfTsKQjo6fkIoKSA9IGRlZmF1bHQ7CgpzdHJ1Y3QgQyA6IEIKewoJQygpCgk6IEEoNykKCSwgQigpCgl7Cgl9Cn07CgppbnQgbWFpbigpCnsKCUMgYzsKCXN0ZDo6Y291dCA8PCBjLnggPDwgc3RkOjplbmRsOwp9Cg==