#include // for std::unique_ptr #include // for EXIT_SUCCESS int main(int argc, char **argv) { std::unique_ptr x(new int(5)); // fail, no copy constructor std::unique_ptr y(x); // succeed, z starts with NULL pointer std::unique_ptr z; // fail, no assignment operator z = x; return EXIT_SUCCESS; }