What are the primary and mixed value categories in C++?
Show answer and explanation
The primary value categories are lvalue, xvalue, and prvalue. Glvalue groups lvalue plus xvalue because both identify an object or function; rvalue groups prvalue plus xvalue because their resources can generally participate in move-oriented operations.
The primary value categories are lvalue, xvalue, and prvalue. Glvalue groups lvalue plus xvalue because both identify an object or function; rvalue groups prvalue plus xvalue because their resources can generally participate in move-oriented operations.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.