TITLE: L-values and operators PROBLEM: kanze@us-es.sel.de (James Kanze), 23 Jul 93 Bjarne apparently changed a number of non-l-values to l-values when he wrote the ARM (or maybe earlier). Could anyone explain to me *why* "++a" or "a = b" should be an l-value? (This *is* an incompatibility with C, although not a serious one, as it relaxes a rule.) RESPONSE: ark@alice.att.com (Andrew Koenig), AT&T Bell Laboratories The original motivation was a member function that looked something like this: T& T::mutate(const T& x) { return *this = x; } The person who said return *this = x; expected it to mean the same thing as *this = x; return *this; Unfortunately, this is true only if T::operator= yields a reference. Next came the example: while (cin.get(x), cin) { // ... } If cin is of a type with a private copy constructor, this works only if , yields a reference. These examples led to the rule: if a built-in operator yields one of its operands unchanged, and that operand is an lvalue, so is the result.