~/talk

Polymorphism != Virtual: Easy, Flexible Runtime Polymorphism Without Inheritance

Talkat CppCon 2019 · 2019-09-15..09-20· [software-architecture]
links:none on file
slides:none on file

Demonstrates a C++17 technique that provides runtime polymorphism without inheritance by shipping a polymorphic single-header (~247 lines) that builds per-interface vtables of trampoline function pointers and dispatches to overloads via a poly_extend mechanism. It implements polymorphic_ref/object types (value semantics, storable in containers), uses only standard C++17 and no macros, and reports sizes ~3× void for refs and ~4× void for objects with runtime performance clustered with other indirect-call approaches, so it works with acceptable overhead.

AI-written summary · about

  1. 0:00Start
  2. 0:28What Is Polymorphism
  3. 1:02Polymorphism Actually Predated Object-Oriented Programming
  4. 3:01Overloading
  5. 7:35Value Semantics
  6. 8:03Low Coupling
  7. 16:31Wish List
  8. 17:54History Lesson
  9. 19:54Polymorphic Principle
  10. 20:52Function Graph
  11. 29:15Polymorphic Object
  12. 32:02Micro Benchmarks
  13. 32:46Final Assessment
  14. 33:52Generate Our Own Vtable
  15. 34:41Function Jump
  16. 35:28Build Av Table from Trampling Functions
  17. 44:44Using Types as Function Names
~/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.