Back to Basics: Object-Oriented Programming in C++
Talkat CppCon 2024 · on Friday, 2024-09-20· at 09:00· Cottonwood 8/9, 6700 North Gaylord Rockies Boulevard·
summary
Shows concrete code and compiler-transformation evidence: uses C++ Insights demo to emit C translation, exposes vtable/vptr reveal and exactly how virtual calls get indexed. Verifies that default parameters are substituted at compile sites so a default-parameter pitfall with virtual functions produces surprising behavior. Demonstrates object slicing, when to make destructors virtual or protected, and claims that a virtual destructor disables move operations. Provides specific examples and slide-linked code (works as shown).
AI-written summary · about
chapters (13)
- 0:00Welcome
- 3:54Classes and encapsulation
- 14:51Struct vs class
- 20:37Best practices for classes
- 24:33Value vs reference types
- 26:21Special member functions
- 32:21Polymorphism and virtual functions
- 40:14Default parameters pitfalls
- 45:21Destructors and polymorphic deletion
- 51:28Template method pattern
- 53:55Good class design and slicing
- 57:27OOP principles summary
- 59:33Q&A
related talks
59mCute C++ Tricks, Part 2.5 of N - Code You Should Learn From & Never Write
01h 03mBack to Basics: Declarations in C++
01h 03mTemplate Metaprogramming: Practical Application
01h 01mBack to Basics: Templates (part 1 of 2)
58mGreat C++ is_trivial: trivial type traits
06mLightning Talk: Fun with Pointers to Members
57mTemplate Shenanigans
01h 05mBack to Basics: Lambdas
