#include <iostream>
#include <memory>
using namespace std;
struct Die {
~Die () {
std:: cout << "dead" << std::endl;
}
};
struct Base {};
struct Derived : public Base {
std::unique_ptr<Die> ptr;
};
int main() {
std::unique_ptr<Base> p = std::make_unique<Derived>();
// oops
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IERpZSB7CiAgfkRpZSAoKSB7CiAgICBzdGQ6OiBjb3V0IDw8ICJkZWFkIiA8PCBzdGQ6OmVuZGw7CiAgfQp9OwpzdHJ1Y3QgQmFzZSB7fTsKc3RydWN0IERlcml2ZWQgOiBwdWJsaWMgQmFzZSB7CiBzdGQ6OnVuaXF1ZV9wdHI8RGllPiBwdHI7Cn07CgppbnQgbWFpbigpIHsKIHN0ZDo6dW5pcXVlX3B0cjxCYXNlPiBwID0gc3RkOjptYWtlX3VuaXF1ZTxEZXJpdmVkPigpOwogLy8gb29wcwogcmV0dXJuIDA7Cn0=