...

/

Rvalues and Lvalues

Rvalues and Lvalues

Here, we'll discuss the properties of rvalues, lvalues, and their references.

Rvalues vs. Lvalues

Rvalues are

  • temporary objects.
  • objects without a name.
  • objects from which we cannot get an address.
  • always on the right side of an assignment operation.

The rest are lvalues. They can be on either side of an assignment operator.

An lvalue can be on the left hand side of an assignment operation. (and of course on the ...