PRACTICE_pointers_smart_pointer_unique_pointer.cpp
/*
 * Unique pointers cannot be copied. It can only be
 * moved from one to another.
 */
Unique pointers cannot be copied. It can only be
moved from one to another.
Unique pointers cannot be copied . It can only be moved from one to another .
void uniquePtrMoveTest(){
    std::unique_ptr<int>test_ptr(new int(59));
    std::unique_ptr<int>test_ptr2(std::move(test_ptr));
    std::cout << *test_ptr2 << std::endl;
}
void uniquePtrMoveTest ( ) { std :: unique_ptr < int > test_ptr ( new int ( 59 ) ) ; std :: unique_ptr < int > test_ptr2 ( std :: move ( test_ptr ) ) ; std :: cout << * test_ptr2 << std :: endl ; }
Unique pointers cannot be copied.
Unique pointers cannot be copied .