Dynamic Polymorphism with Metaclasses and Code Injection
recording made private on YouTubehttps://youtu.be/drt3yXI-fqk
summary
Argues that type erasure plus compile‑time code injection and metaclasses Clang fork can reproduce virtual dispatch with value semantics, configurable storage (SBO or in‑place), and generated vtables/clone/move logic, implemented as a prototype that auto‑injects function pointers from a facade and removes intrusive inheritance and external owning pointers. Shows working code on Compiler Explorer and GitHub. Remaining costs include compile‑time overhead and some runtime cases where traditional vtables outperform generated function‑pointer call patterns.
AI-written summary · about
related talks
01h 00mDynamic Polymorphism with Metaclasses and Code Injection
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
59mMeta++: Language Support for Advanced Generative Programming
01h 41mC++ Type Erasure Demystified
01h 48m“Meta: Thoughts on generative C++”
58mBetter Code: Runtime Polymorphism
55mBreaking Dependencies: Type Erasure - The Implementation Details
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)