#include #include using namespace std; unique_ptr get_int(int x) { unique_ptr p (new int); *p = x; return p; } int main() { unique_ptr x = get_int(22); // unique_ptr y = x; // COMPILE ERROR cout << *x << endl; return 0; }