The Compound Assignment Operators
Whenever possible, define one operator in terms of another.
AnObject operator + (const AnObject & left, const AnObject & right) {AnObject clone(left); // copy the left argumentclone += right; // combine with rightreturn clone; // return updated value
const AnObject & operator += (AnObject & left, const AnObject & right) {AnObject sum = left + right;left = sum;return left;