so assume we write the following in C++: a=b=5;
which basically means a=(b=5);
If we have a=5;
I know that 5 is a literal and thus it is an R-Value. a
is an L-Value. Same goes for b=5;
I'm wondering now, what happens, if we write a=b=5;
respectively a=(b=5);
Can I now say the following?
For a
, b=5
is an R-Value with a
being an L-Value. Also, b
is an L-Value and 5
is an R-Value.
What's the R-Value of a
?