Get the latest tech news

Beautiful Type Erasure with C++26 Reflection


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. rjk::duck uses the magic that is C++26 reflection to remove these pain points while preserving all of the customization and performance.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of reflection

reflection

Related news:

News photo

Nebius to Sell $1 Billion in AI Capacity to Reflection

News photo

SpaceX signs computing power deal with open-source AI startup Reflection worth up to $6.3 billion

News photo

SpaceX Inks Multibillion-Dollar Computing Deal With Reflection AI