```cpp int x = 5; // x: lvalue int* p = &x int& y = x; // y: lvalue? const int& z = x; // z: lvalue? int&& y1 = x; // y1: xvalue const int&& y1 = x; // allowed?
glvalue: generalized left value xvalue: have a memory location (non-persistent, can change)
prvalue: pure rvalue
prvalue: not addressable. Exisits only within single expression rvalue: no persistent memory location glvalue: identifiable memory location (which can change)
Previous Page | Course Schedule | Course Content