Tuesday, December 25, 2018

c++ - What are rvalues, lvalues, xvalues, glvalues, and prvalues?

In C++03, an expression is either an rvalue or an lvalue.




In C++11, an expression can be an:




  1. rvalue

  2. lvalue

  3. xvalue

  4. glvalue

  5. prvalue




Two categories have become five categories.




  • What are these new categories of expressions?

  • How do these new categories relate to the existing rvalue and lvalue categories?

  • Are the rvalue and lvalue categories in C++0x the same as they are in C++03?

  • Why are these new categories needed? Are the WG21 gods just trying to confuse us mere mortals?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...