Back to Basics: Class Layout
summary
Explains how compilers actually lay out C++ objects: field offsets, padding, vptr/vtable entries and thunks, and how those choices break memcmp-based comparisons and void hacks; demonstrates ARM assembly output (via Compiler Explorer) and concrete hardware mappings (memory‑mapped UART/timer) with static checks like static_assert and offsetof; shows C++20 fixes such as no unique address* and new type_traits, quantifies surprises (padding bytes can flip equality after unrelated calls) and explains thunk vs delta table implementations.
AI-written summary · about
chapters (5)
- 0:00Start
- 4:37Non-Static Data Member Layout
- 36:41Virtual Calling Sequence
- 41:00Implementation of Multiple Inheritance
- 59:15Use Interface Classes
related talks
01h 06mBack to Basics: Functions in C++
39mBack to Basics: The Rule of Five in C++
01h 02mBack to Basics - Name Lookup and Overload Resolution in C++
01h 02mBack To Basics: The Special Member Functions
01h 05mBack To Basics: Overload Resolution
01h 03mBack to Basics: The C++ Core Guidelines
58mLeveraging C++20/23 Features for Low Level Interactions
58mUnderstanding and Mastering C++'s Complexity
