Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From this <a href="http://publib.boulder.ibm.com/infocenter/lnxpcomp/v7v91/index.jsp?topic=/com.ibm.vacpp7l.doc/language/ref/clrc05lvalue.htm" rel="nofollow noreferrer">article</a>. Since the OP was a bit lazy in asking his question (although some people disagree, see comments), I'll be lazy as well and simply paste the entire relevant part here, probably breaking some copyright laws.</p> <blockquote> <p>An object is a region of storage that can be examined and stored into. An lvalue is an expression that refers to such an object. An lvalue does not necessarily permit modification of the object it designates. For example, a const object is an lvalue that cannot be modified. The term modifiable lvalue is used to emphasize that the lvalue allows the designated object to be changed as well as examined. The following object types are lvalues, but not modifiable lvalues:</p> <ul> <li>An array type</li> <li>An incomplete type</li> <li>A const-qualified type</li> <li>An object is a structure or union type and one of its members has a const-qualified type </li> </ul> <p>Because these lvalues are not modifiable, they cannot appear on the left side of an assignment statement.</p> <p>In C++, a function call that returns a reference is an lvalue. Otherwise, a function call is an rvalue expression. In C++, every expression produces an lvalue, an rvalue, or no value.</p> <p>Certain operators require lvalues for some of their operands. The table below lists these operators and additional constraints on their usage.</p> </blockquote> <pre> Operator Requirement & (unary) Operand must be an lvalue. ++ -- Operand must be an lvalue. This applies to both prefix and postfix forms. = += -= *= %= >= &= ^= |= Left operand must be an lvalue. </pre> <blockquote> <p>For example, all assignment operators evaluate their right operand and assign that value to their left operand. The left operand must be a modifiable lvalue or a reference to a modifiable object.</p> <p>The address operator (&amp;) requires an lvalue as an operand while the increment (++) and the decrement (--) operators require a modifiable lvalue as an operand.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload