As a continuation of the question " Differences between Rvalue and Lvalue " and based on the question " What are rvalues, lvalues, xvalues, glvalues, and prvalues? ".
In C++03, an expression could be rvalue
or lvalue
.
As of C++11, three new categories were added, the full list of categories being:
rvalue
: Value of the right side (r
ightvalue
).lvalue
: Value of the left side (l
eftvalue
).xvalue
: Expiration value (ex
piringvalue
).glvalue
: Value of the generalized left-hand side ( generalized eftg
) .l
value
prvalue
: Value of the pure right hand side (p
urer
ightvalue
).
We have gone from two categories to five.
- What are these new categories of expressions?
- How are they related to the
rvalue
ylvalue
that existed before? - Are the
rvalue
ylvalue
's in C++03 the same as in C++11? - Why are these categories necessary?
Is the standards committee just trying to confuse us?