#include <iostream>
#include <memory>
class A
{
public:
~A() {std::cout << "A::~A()\n";}
};
class B : public A
{
public:
~B() {std::cout << "B::~B()\n";}
};
int main()
{
std::unique_ptr<A> p(new B);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5PgoKY2xhc3MgQQp7CnB1YmxpYzoKICAgIH5BKCkge3N0ZDo6Y291dCA8PCAiQTo6fkEoKVxuIjt9ICAgIAp9OwoKY2xhc3MgQiA6IHB1YmxpYyBBCnsKcHVibGljOgogICAgfkIoKSB7c3RkOjpjb3V0IDw8ICJCOjp+QigpXG4iO30gICAgCn07CgppbnQgbWFpbigpCnsKICAgc3RkOjp1bmlxdWVfcHRyPEE+IHAobmV3IEIpOwogICByZXR1cm4gMDsKfQ==