std::unique_ptrmyInt = std::make_unique (42);
std::unique_ptrmyInt2 = std::move(myInt);
std::unique_ptrThis creates a unique_ptr that manages a dynamic array of 5 ints. It also specifies a custom deleter function that will be called when the unique_ptr is destroyed. In this case, the deleter function deletes the array using the operator delete[]. The std::unique_ptr is part of the C++11 standard library and is in themyInt3(new int[5], [](int* p){ delete[] p; });