~/talk

C++ Under the Hood: (Internal Class Mechanisms)

Talkat NDC TechTown 2024 · 2024-09-09..09-12· [c-and-cpp]
links:none on file
slides:none on file

Examines concrete C++ mechanics: object layout and why a vtable at offset zero makes base-to-derived casts work, how multiple inheritance produces adjusted this pointers and runtime offsets, and that compilers emit a thunk for pointer-to-member calls so virtual resolution still happens. Covers precise construction/destruction order (members forward, teardown reverse), static inline variables (C++17/20) and stack-frame calling convention details for walking and unwinding stacks. Notes an implementation quirk: a null member-pointer = -1 on some platforms.

AI-written summary · about

  1. 0:00C++ class internals
  2. 1:26Object footprint and vtables
  3. 4:13Inheritance hierarchy
  4. 14:21Construction/destruction order
  5. 20:46Array construction rules
  6. 23:39Static members and globals
  7. 33:24Global object order
  8. 37:21Virtual functions inside constructors and destructors
  9. 44:28Raw vs member function pointers
  10. 52:15Member function pointers and virtual calls
  11. 1:00:42Pointer to member data
  12. 1:07:03Sorting with member pointers
  13. 1:10:59Stack frames in x86
  14. 1:19:09Summary
~/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.