int main()
{
std::unique_ptr<int> mInt = std::make_unique<int>();
// Move contents of mInt into mInt2
std::unique_ptr<int> mInt2 = std::move( mInt );
return 0;
}
What ends up happening to the first unique pointer, mInt? Does it get destroyed or is it left as a nullptr?
In general, when you call the move assignment operator, the first object is left in an unspecified (but still destructible) state and should not be used.