#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+QSgpID0gZGVmYXVsdDsKCnN0cnVjdCBCIDogdmlydHVhbCBBCnsKCUIoKQoJLy86IEEoLTEpCgl7Cgl9Cgl2aXJ0dWFsIH5CKCkgPSAwOwp9OwpCOjp+QigpID0gZGVmYXVsdDsKCnN0cnVjdCBDIDogQgp7CglDKCkKCTogQSg3KQoJLCBCKCkKCXsKCX0KfTsKCmludCBtYWluKCkKewoJQyBjOwoJc3RkOjpjb3V0IDw8IGMueCA8PCBzdGQ6OmVuZGw7Cn0K