Hacker News new | ask | show | jobs
by usrnm 18 days ago
> If you’ve ever tried using type erasure for something more complicated than std::any or std::function, you’ve either written 100+ lines of easy-to-mess-up code or reached for a boilerplate-heavy library like Boost.TypeErasure or Folly.Poly

Or you just used void* and went on with your life

2 comments

You mean "used void* and wrote lots and lots of linter suppression comments" because it's fundamentally amateurish to write C++ without at least clang-tidy, cppcheck, and a couple others.
And lost value semantics and any hope of type safety.