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