#include <iostream>
struct PureVirtual {
virtual void Function() = 0;
};
struct FunctionImpl {
virtual void Function() {
std::cout << "FunctionImpl::Function()" << std::endl;
}
};
struct NonPureVirtual : public FunctionImpl, public PureVirtual {
virtual void Function() override {
return FunctionImpl::Function();
}
};
int main() {
NonPureVirtual c;
c.Function();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IFB1cmVWaXJ0dWFsIHsKICAgIHZpcnR1YWwgdm9pZCBGdW5jdGlvbigpID0gMDsKfTsKCnN0cnVjdCBGdW5jdGlvbkltcGwgewogICAgdmlydHVhbCB2b2lkIEZ1bmN0aW9uKCkgewogICAgICAgIHN0ZDo6Y291dCA8PCAiRnVuY3Rpb25JbXBsOjpGdW5jdGlvbigpIiA8PCBzdGQ6OmVuZGw7CiAgICB9ICAgCn07CgpzdHJ1Y3QgTm9uUHVyZVZpcnR1YWwgOiBwdWJsaWMgRnVuY3Rpb25JbXBsLCBwdWJsaWMgUHVyZVZpcnR1YWwgewogICAgdmlydHVhbCB2b2lkIEZ1bmN0aW9uKCkgb3ZlcnJpZGUgewogICAgCXJldHVybiBGdW5jdGlvbkltcGw6OkZ1bmN0aW9uKCk7CiAgICB9Cn07CgppbnQgbWFpbigpIHsKICAgIE5vblB1cmVWaXJ0dWFsIGM7CiAgICBjLkZ1bmN0aW9uKCk7Cn0=