unique_ptr ptr1 (new A); // Error: can't copy unique_ptr unique_ptr ptr2 = ptr1; // Works, resource now stored in ptr2 unique_ptr ptr2 = move(ptr1);