~/talk

Applied Modern C++: beyond type erasure and visitor pattern

Talkat Meeting C++ 2024 · 2024-11-14..11-16· [frontend-architecture]
links:none on file
slides:none on file

Claim: a reusable C++ library composes type erasure and visitor pattern via templated base, pimple (pimpl) strategies and a visitor strategy so a pipeline can grow both types and operations. Tools: templates, std::function/func pointers, optional manual dispatch vtable via function pointers, and comparison to std::variant. Built: demo (animals, OpenGL drawer), code on GitHub, measurements show classic type eraser ~10–20% slower than std::variant while manual dispatch is roughly on par, and the implementation works and is ready for production use.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:10Agenda and goals
  3. 2:41Software evolution
  4. 3:40Architectural flexibility
  5. 5:04Pattern summary
  6. 6:02Visitor pattern with std::visit
  7. 7:19Visitor pattern examples
  8. 8:31Visitor pattern pros and cons
  9. 10:12Type erasure pattern
  10. 10:43Type erasure implementation
  11. 11:52Type erasure pros and cons
  12. 12:57The problem of flexibility
  13. 14:47Proposed solution
  14. 16:01Solution implementation
  15. 24:22Hybrid pattern dependency graph
  16. 26:36Performance measurement
  17. 28:25Code demo
  18. 30:53Adding new types and actions
  19. 37:00Alternative implementations
  20. 37:31Handling errors
  21. 38:56Lessons learned
  22. 41:10Q&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.