Value Category Meanings
suggest changeExpressions in C++ are assigned a particular value category, based on the result of those expressions. Value categories for expressions can affect C++ function overload resolution.
Value categories determine two important-but-separate properties about an expression. One property is whether the expression has identity. An expression has identity if it designates an object or function that can be identified, for example by its address. It does not have to name a variable. *p has identity even when the object has no name.
The other property is whether it is legal to implicitly move from the expression’s value. Or more specifically, whether the expression, when used as a function parameter, will bind to r-value parameter types or not.
C++ defines 3 value categories which represent the useful combination of these properties: lvalue (expressions with identity but not movable from), xvalue (expressions with identity that are moveable from), and prvalue (expressions without identity that are moveable from). C++ does not have expressions which have no identity and cannot be moved from.
C++ defines two other value categories, each based solely on one of these properties: glvalue (expressions with identity) and rvalue (expressions that can be moved from). These act as useful groupings of the prior categories.
This graph serves as an illustration: