An expression that refers to a memory location and therefore we can get the address of via the & operator
int area = height * width
, area
is the lvalueAn expression that is not an lvalue
int area = height * width
, height * width
is the rvaluefoo()
returns an lvaluebar()
returns an rvaluei
is an lvaluefoo()
is an lvaluefoo()
bar()
swap()
swap()
type operationsswap()
methodswap()
methodA&
- lvalue referenceA&&
- rvalue referenceswap()
Implementationstd::move()
std::move()
Implementationstd::move()