Commit 5200abf1 authored by knowledge4igor's avatar knowledge4igor

Fix undefined behaviour in copy assignment operator: forgotten return value

parent efe54d9e
......@@ -552,6 +552,7 @@ struct MoveOnCopy {
MoveOnCopy& operator=(MoveOnCopy& other) {
val = std::move(other.val);
return *this;
}
MoveOnCopy(MoveOnCopy&& other) = default;
......
Markdown is supported
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