Vocabulary Types for Composite Class Design
summary
Proposal of two concrete class templates, polymorphic_value and indirect_value, that let composite classes own objects as values so the compiler can generate correct copy/move/destructors and const propagation. Reference implementations are single-header, MIT-licensed libraries; polymorphic_value uses type erasure with a control block to clone derived objects (plus a risky pointer+copier constructor for migration), while indirect_value stores incomplete types with customizable copier/deleter and uses empty-base optimization to avoid overhead. Papers are in flight.
AI-written summary · about
chapters (4)
related talks
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
01h 23mRethink Polymorphism in C++
58mBetter Code: Runtime Polymorphism
57mFun with Type Erasure: Implementing a Value Wrapper for Polymorphic Types
55mBreaking Dependencies: Type Erasure - The Implementation Details
01h 30mRethinking the Way We Do Templates in C++
01h 01m“Template Normal Programming (part 2 of 2)"
01h 20mWhat Classes We Design and How
