~/talk

Back to Basics: Class Layout

Talkat CppCon 2020 · 2020-09-14..09-18· at 13:30· Back to Basics, online· [rust]
links:none on file
slides:none on file

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

  1. 0:00Start
  2. 4:37Non-Static Data Member Layout
  3. 36:41Virtual Calling Sequence
  4. 41:00Implementation of Multiple Inheritance
  5. 59:15Use Interface Classes
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.