How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Deriving Type Erasure -- David Álvarez Rosa

calendar_today August 15, 2026 person dalvrosa domain cplusplus

A step-by-step derivation of the type-erasure idiom, building a minimal std::any from nothing but virtual functions and templates. Deriving Type Erasure by David Álvarez Rosa From the article: Ever looked at std::any and wondered what’s going on behind the scenes? Beneath the intimidating interface is a classic technique called type erasure: concrete types hidden behind a small, uniform wrapper.

open_in_new Read original post