Commit d695a117 authored by Philip Trettner's avatar Philip Trettner
Browse files

removed test for self-move

parent dea6da5e
......@@ -26,12 +26,10 @@ struct unique_array
}
unique_array& operator=(unique_array&& rhs) noexcept
{
if (this != &rhs)
{
delete[] ptr;
ptr = rhs.ptr;
rhs.ptr = nullptr;
}
// self-move results in moved-from state
delete[] ptr;
ptr = rhs.ptr;
rhs.ptr = nullptr;
return *this;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment