Lvalues and Rvalues
Lvalues have identity (a named variable); rvalues are temporaries about to disappear.
Intermediate
x = 5 — x is an lvalue, 5 an rvalue. Rvalue references (T&&) let code "steal" from temporaries — the basis of move semantics.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.