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.
Starting from familiar tools like virtual functions and templates, we'll
build a minimal `std::any`. By the end, you'll have a clear understanding
of how type erasure works under the hood.
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.
Starting from familiar tools like virtual functions and templates, we'll build a minimal `std::any`. By the end, you'll have a clear understanding of how type erasure works under the hood.