Meta Polymorphism
summary
Claim: C++ offers many kinds of polymorphism beyond virtual functions, and the talk demonstrates concrete techniques that work. It shows polymorphism at pre-processing compilation link and runtime, macros (mccarran) for compile-time hooks, templates and explicit instantiation with a “Chinese wall” for tests, link-time mocking with fcm, visitor and registry maps to emulate multiple dispatch, and value-semantics type‑erasure using any + lambda to avoid heap allocations — each described with code patterns and when they succeed or cost you.
AI-written summary · about
chapters (11)
- 0:00Start
- 2:07Polymorphism is not going away
- 5:21DISCLAIMER
- 9:35Application: mocking
- 13:36Explicit instantiation
- 16:25Moments of resolution in C++ FOR MOCKING
- 19:27Dispatching
- 34:44Scott Meyer's double dispatch
- 38:48The bigger picture of polymorphism
- 39:39Nature of polymorphism
- 41:22A group of functions
related talks
01h 05mExpressing Implementation Sameness and Similarity - Polymorphism in Modern C++
49mA Journey Into Non-Virtual Polymorphism in C++
01h 03mMeta Techniques: Heterogeneous Polymorphism & Fast Prototyping at Facebook
59mPolymorphism with Unions
05mLightning Talk: Is Polymorphism in C++ Really That Bad?
01h 39mKeynote - C++ Metaprogramming: evolution and future direction
01h 01mUsing Modern C++ to Eliminate Virtual Functions
08mPolymorphic Task
