the following may help determine wheter an object is a lvalue or rvalue: if the object obtained from an expression has a name, then it must be lvalue; otherwise it is rvalue. this means all
temporary objects must be rvalues. example: ++a; // the result is 'a ', which has a name -- 'a ', so it is lvalue.
An lvalue is an expression denoting a nonconstant object.
-TCPL
a++ denoting a constant temporary object which equal to a before ++.
++a denoting a nonconstant object which is a after ++. |