#include <cstdio> // for printf.
struct b
{
virtual ~b() = 0;
virtual auto f() -> void = 0;
};
// 気が変わった
b::~b(){}
struct d : b
{
virtual ~d() {}
auto f() -> void override { std::printf("d::f\n"); };
};
auto main() -> int
{
d i;
static_cast<b *>(&i)->f();
}
I2luY2x1ZGUgPGNzdGRpbz4JLy8gZm9yIHByaW50Zi4KCnN0cnVjdCBiCnsKCXZpcnR1YWwgfmIoKSA9IDA7Cgl2aXJ0dWFsIGF1dG8gZigpIC0+IHZvaWQgPSAwOwp9OwoKLy8g5rCX44GM5aSJ44KP44Gj44GfCmI6On5iKCl7fQoKc3RydWN0IGQgOiBiCnsKCXZpcnR1YWwgfmQoKSB7fQoJYXV0byBmKCkgLT4gdm9pZCBvdmVycmlkZSB7IHN0ZDo6cHJpbnRmKCJkOjpmXG4iKTsgfTsKfTsKCmF1dG8gbWFpbigpIC0+IGludAp7CglkIGk7CglzdGF0aWNfY2FzdDxiICo+KCZpKS0+ZigpOwp9Cg==