Back to Basics: Understanding Value Categories - Ben Saks - CppCon 2019
CppCon CppCon
148K subscribers
34,803 views
0

 Published On Oct 2, 2019

http://CppCon.org
Discussion & Comments:   / cpp  
Presentation Materials: https://github.com/CppCon/CppCon2019


Back to Basics: Understanding Value Categories

You may be familiar with the terms lvalue, rvalue, and xvalue, if only because they occasionally appear in compiler error messages. However, if you have only a vague understanding of what they mean, you're not alone. Lvalues, rvalues, and xvalues aren't actually language features, but rather semantic properties of expressions and sub-expressions. Understanding these properties provides valuable insights into the behavior of built-in operators, the code generated to execute those operators, and the meaning of some otherwise cryptic compiler error messages. Understanding these properties is also essential for working effectively with lvalue and rvalue reference types, as well as overloaded operators.

This session explains why the language distinguishes among lvalues, rvalues, and xvalues. It describes how the semantic properties of lvalues, rvalues, and xvalues are different and how those properties are reflected in the behavior of lvalue and rvalue references.


Ben Saks


Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

*-----*
Register Now For CppCon 2022: https://cppcon.org/registration/
*-----*

show more

Share/Embed