#include <memory>
#include <iostream>
int main()
{
std::default_delete<int> d;
std::unique_ptr<int> u1;
std::cout << "u1: " << (u1 ? "not null" : "null") << '\n';
std::unique_ptr<int> u2(nullptr);
std::cout << "u2: " << (u2 ? "not null" : "null") << '\n';
std::unique_ptr<int> u3(new int);
std::cout << "u3: " << (u3 ? "not null" : "null") << '\n';
std::unique_ptr<int> u4(new int, d);
std::cout << "u4: " << (u4 ? "not null" : "null") << '\n';
std::unique_ptr<int> u5(new int, std::default_delete<int>());
std::cout << "u5: " << (u5 ? "not null" : "null") << '\n';
std::unique_ptr<int> u6(std::move(u5));
std::cout << "u6: " << (u6 ? "not null" : "null") << '\n';
std::unique_ptr<int> u7(std::move(u6));
std::cout << "u7: " << (u7 ? "not null" : "null") << '\n';
}
I2luY2x1ZGUgPG1lbW9yeT4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CglzdGQ6OmRlZmF1bHRfZGVsZXRlPGludD4gZDsKCXN0ZDo6dW5pcXVlX3B0cjxpbnQ+IHUxOwoJc3RkOjpjb3V0IDw8ICJ1MTogIiA8PCAodTEgPyAibm90IG51bGwiIDogIm51bGwiKSA8PCAnXG4nOwoKCXN0ZDo6dW5pcXVlX3B0cjxpbnQ+IHUyKG51bGxwdHIpOwoJc3RkOjpjb3V0IDw8ICJ1MjogIiA8PCAodTIgPyAibm90IG51bGwiIDogIm51bGwiKSA8PCAnXG4nOwoKCXN0ZDo6dW5pcXVlX3B0cjxpbnQ+IHUzKG5ldyBpbnQpOwoJc3RkOjpjb3V0IDw8ICJ1MzogIiA8PCAodTMgPyAibm90IG51bGwiIDogIm51bGwiKSA8PCAnXG4nOwoKCXN0ZDo6dW5pcXVlX3B0cjxpbnQ+IHU0KG5ldyBpbnQsIGQpOwoJc3RkOjpjb3V0IDw8ICJ1NDogIiA8PCAodTQgPyAibm90IG51bGwiIDogIm51bGwiKSA8PCAnXG4nOwoKCXN0ZDo6dW5pcXVlX3B0cjxpbnQ+IHU1KG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