The operator MoveAssignmentBase & operator=(MoveAssignmentBase && rhs) has this assert:
assert(this->has_value() == rhs.has_value());
It triggers in our code. The reason is that
this->AssignValue(std::move(rhs.GetPayload()));
might set rhs to the empty state if the moved-from-state happens to be the empty-state. I don't know what the assert is supposed to protect. It looks unnecessary. Could there be problems if I remove it?
The operator
MoveAssignmentBase & operator=(MoveAssignmentBase && rhs)has this assert:It triggers in our code. The reason is that
might set rhs to the empty state if the moved-from-state happens to be the empty-state. I don't know what the assert is supposed to protect. It looks unnecessary. Could there be problems if I remove it?