Back to Basics: Master C++ Value Categories With Standard Tools
summary
Clear claim: value category is a property of an expression, not an object. Examples show a single line producing two objects when a const return blocks a move. Concrete rules and tools include binding rules for initialization/function return, language changes (C++17 guaranteed copy elision, C++20 implicit move, C++23 explicit object parameter) and std utilities: std::move, std::forward, std::decay_t, std::declval. Slides link to GitHub and Godbolt snippets for exact code and counts.
AI-written summary · about
chapters (33)
- 0:00Introduction
- 0:37Motivation
- 8:10References
- 9:05Value Category
- 14:12Value Category Evolution
- 15:21Reference and Move Semantics
- 18:23Implicit Move
- 19:37Terminology
- 21:35Lvalue
- 22:56PRvalue
- 23:31Xvalue
- 24:37Real Life Code
- 28:24Function Calls
- 33:09Guaranteed Copy Illusion
- 34:20Materialization
- 34:43Standard Terminology
- 36:31Summary
- 37:09Reference Collision
- 37:28Reference Collision Example
- 38:39Forwarding Reference
- 40:15Conclusion
- 40:38Move
- 41:20Code Snippets
- 42:03Stand Forward
- 42:47Overloads
- 43:52Decay
- 45:00Decal Type
- 46:27DecalVal
- 47:55Reducing
- 48:29Overload
- 48:44Single Declaration Template
- 49:21Other Tools
- 49:43Recap
related talks
58mUnderstanding and Mastering C++'s Complexity
01h 30m50 shades of C++
01h 04mBack to Basics: Move Semantics
01h 00mThe Implementation of Value Types
57mBetter Code: Exploring Validity in C++
01h 10mAn Overview of C++11/14, Part II
01h 30mValue in a Procedural World
39mBack to Basics: The Rule of Five in C++
