~/talk

C++ Under the Hood: Internal Class Mechanisms

Talkat CppCon 2024 · on Wednesday, 2024-09-18· at 15:15· Adams A, 6700 North Gaylord Rockies Boulevard· [developer-experience]
links:none on file
slides:none on file

Concrete demos of how objects get built and torn down: vtable pointer setup during inside‑out construction and outside‑in destruction, and why destructors reassign vtables. Shows how member‑function pointers use compiler thunks for polymorphic dispatch and how member‑data pointers store offsets (null can be nonzero). Live code sketches implement a multicolumn sort using captured member‑data pointers, and a stack‑frame walkthrough explains base pointer links and backtraces on x86. Slides and working examples available; explanations are implementation‑level and practical.

AI-written summary · about

  1. 0:00Introduction to C++ under the hood
  2. 1:03Why internals matter
  3. 3:13ISA vs HAS-A inheritance
  4. 3:56Constructors, destructors, vtables
  5. 9:19Destructing objects outside-in
  6. 11:33Data and function pointers
  7. 13:00Function pointers in C
  8. 15:49C++ sort with function pointers
  9. 16:30Member function pointers
  10. 21:36Member data pointers
  11. 23:47Null in C++
  12. 27:20Sorting with member pointers & lambdas
  13. 30:14Memory footprint & vtables
  14. 38:56Stack frames & base pointers
  15. 45:38Function return & cleanup
  16. 46:00Q&A session part one
  17. 50:15Q&A session part two
  18. 53:51Q&A session part three
  19. 55:44Q&A session part four
~/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.