Back to Basics: Declarations in C++
summary
Explains concrete rules rather than vague tips: why constexpr requires an initializer with examples of object definitions vs non-defining extern declarations, how T&& becomes a forwarding reference versus an rvalue reference and the deduction contexts that decide it, when to write typename for dependent nested types because of two‑phase template lookup, and the declarator operator precedence that makes pointer vs array vs function meanings. Examples compile or fail to show each rule.
AI-written summary · about
chapters (11)
- 0:00Declarations in C++
- 0:22Declarations vs definitions
- 6:11Structure of declarations
- 13:43Most vexing parse
- 19:24East const style
- 21:33Initializers in declarations
- 24:01Const differences
- 27:33Type name in templates
- 31:30Two-phase template translation
- 42:25Forwarding references
- 52:58Q&A
related talks
01h 01mBack to Basics: Concepts in C++
01h 02mBack to Basics: Forwarding References - How to Forward Parameters in Modern C++
01h 01mBack to Basics: Templates (part 1 of 2)
01h 10mType Deduction and Why You Care
52mClasses C++23 Style
01h 11mC++20 Templates: The next level: Concepts and more
01h 02mUniversal/Forwarding References
01h 03mTemplates Made Easy with C++20
