Input your struct. Pick your strategy. Get production-ready, elegant code. No more void* nightmares.
Every day, thousands of C++ developers wrestle with type erasure — hiding concrete types behind a uniform interface.
The recent “Show HN: Beautiful Type Erasure with C++26 Reflection” post gathered 44 points and cross-platform traction in hours,
revealing a deep, unmet need: developers want elegant type erasure, not the clunky std::any or error-prone void* patterns.
Existing solutions either sacrifice performance (virtual tables) or readability (manual type tags).
The community is hungry for a tool that generates idiomatic, committee-quality code — instantly.
Why now? C++26 reflection is still a proposal, but the discussion is at its peak.
Developers are actively searching for ways to simulate reflection today, while keeping their codebase future-proof.
This is the perfect window to provide a bridge: a code generator that produces both current-day patterns (virtual, std::function)
and a reflection-mock that mirrors the upcoming standard. Early adopters are already engaging — the signal is hot, the pain is real, and no product owns this space yet.
The alternative? Keep writing the same 50-line wrapper by hand, debugging subtle lifetime bugs, and explaining to your team why “it’s just a type erasure.” Or use a generator that does it in one click, with three strategies side-by-side, so you can pick the trade-off that fits your project. That’s the shift we’re enabling.
Copy any C++ struct or class definition — even one with multiple fields and nested types. The parser extracts names and types in real time, right in your browser.
Pick from Virtual (classic OOP), std::function (modern, allocation-free), or C++26 Reflection mock (future-proof). Each strategy is generated with idiomatic naming and const-correctness.
Review the side-by-side comparison, see the trade-offs at a glance, and copy the generated code with one click. No sign-up, no backend — your data never leaves your machine.
Paste your struct definition and get three complete type erasure implementations in under a second. No waiting, no compilation — just clean, ready-to-use C++ code.
Every generated snippet follows the latest C++ Core Guidelines, uses constexpr where possible, and avoids raw pointers. Your code will look like it was reviewed by the committee.
See Virtual, std::function, and Reflection mock displayed together with highlighted differences. Understand the performance vs. readability trade-off instantly.