A common use of ChangeStatus is as follows:
ChangeStatus Changed = ChangeStatus::UNCHANGED; Changed |= foo();
where foo returns ChangeStatus as well. Currently ChangeStatus doesn't
support compound assignment, we have to write as
Changed = Changed | foo();
which is not that convenient.
This patch add the support for compound assignment for ChangeStatus. Compound
assignment is usually implemented as a member function, and binary arithmetic
operator is therefore implemented using compound assignment. However, unlike
regular C++ class, enum class doesn't support member functions. As a result, they
can only be implemented in the way shown in the patch.