Beautiful Type Erasure with C++26 Reflection

·Hacker News··

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.

Read full article →

Related Articles

Codex starts encrypting sub-agent prompts
embedding-shape · Hacker News · 3h ago
Australian energy retailers must provide three hours of free daytime electricity
i2oc · Hacker News · 9h ago
LAPD lets contract with surveillance giant Flock expire
forks · Hacker News · 23h ago
Grok CLI uploaded the whole home directory to GCS
denysvitali · Hacker News · 1d ago
Former NOAA employees built Climate.us to preserve climate data and resources
benwerd · Hacker News · 18h ago