~/talk

A Journey Into Non-Virtual Polymorphism in C++

Talkat CppCon 2023 · on Wednesday, 2023-10-04· at 09:00· Adams, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Shows concrete code using std::variant with std::visit and pointers to avoid copying, rejects std::any for embedded systems due to dynamic allocation, and demonstrates the overload idiom to dispatch lambdas. Treats std::tuple/std::apply as a container‑like, loop‑unroll mechanism and notes measurable speedup in heavy loops. Presents CRTP examples (including a wait pattern) and how C++23 deducing this removes many static_casts, with runnable GCC 13.2 sample code and a robot serial‑message parser proving the ideas work.

AI-written summary · about

  1. 0:00Welcome
  2. 1:25Turbo C++ journey
  3. 3:12Understanding polymorphism in C++
  4. 4:36Avoid inheritance
  5. 7:28Embedded systems example
  6. 9:17Polymorphic variables challenge
  7. 10:21std::any limitations
  8. 13:32std::variant for type safety
  9. 16:43std::variant walkthrough
  10. 20:01Overload idiom
  11. 23:59Overload in robotics
  12. 27:37std::variant vs std::any
  13. 27:58std::tuple for polymorphism
  14. 31:12Tuple-like traits
  15. 32:43Loop unrolling with std::array
  16. 34:33Curiously Recurring Template Pattern basics
  17. 37:05CRTP shapes design
  18. 38:49CRTP efficiency
  19. 39:53CRTP with existing classes
  20. 40:36CRTP in robotics
  21. 42:46Explicit object parameter
  22. 44:10When to use non-virtual
  23. 44:52Summary
  24. 45:13Q&A
~/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.