Value categories

Each C++ expression (an operator with its operands, a literal, a variable name, etc.) is characterized by two independent properties: a type and a value category. Each expression has some non-reference type, and each expression belongs to exactly one of the three primary value categories: prvalue, xvalue, and lvalue.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
CWG 616C++11member access and member access throughpointer to member of an rvalue resulted in prvaluereclassified as xvalue
CWG 1059C++11array prvalues could not be cv-qualifiedallowed
CWG 1213C++11subscripting an array rvalue resulted in lvaluereclassified as xvalue

# See also