#include // for std::unique_ptr #include // for EXIT_SUCCESS using std::unique_ptr; int main(int argc, char **argv) { unique_ptr x(new int(5)); // Success: constructor takes raw pointer unique_ptr y(x); // Failure: no copy constructor unique_ptr z; // Success: default constructor initializes // to nullptr z = x; // Failure: no assignment operator return EXIT_SUCCESS; }