Latest / Developer tools

rjk-duck

ryanjk5.github.io · Open source · Online

Type erasure in C++26 using static reflection

Visit ryanjk5.github.io ↗Source on GitHub ↗Share

  • c 26
  • reflection
  • c type erasure
  • c 26 reflection
  • static reflection
  • polymorphism without inherit
  • cpp type erasure library
Found
4 months ago

A C++ library that uses C++26 reflection to implement type erasure with less boilerplate. A Compiler Explorer link lets you try it without a local toolchain, which suits C++ developers following the new language features.

Positioned as an alternative to Boost.TypeErasure, Folly.Poly.

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 w

How ryanjk5.github.io describes itself

What it does

  • Type erasure implemented with C++26 static reflection
  • Less boilerplate than Boost.TypeErasure or Folly.Poly
  • Keeps customization and performance of hand-written type erasure
  • Try it on Compiler Explorer without a local toolchain

Good for

  • Add type erasure to a C++ project with a small amount of code
  • Try C++26 reflection on Compiler Explorer
  • Compare type erasure approaches against Boost.TypeErasure

Suits: C++ developers exploring C++26 reflection.

What you can try

Open the Compiler Explorer link in the post or read the source on GitHub.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw rjk-duck on , when RyanJK5 posted it to Show HN. There is no first-party release record KipFound is allowed to read for this product, so that listing is the earliest dated evidence on file. KipFound does not guess a release date.

Day-7 and day-30 updates

Day 7 still online

  • Product link responded normally (HTTP 200).
  • Show HN discussion at check time: 117 points, 58 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 still online

  • Product link responded normally (HTTP 200).
  • Show HN discussion at check time: 117 points, 58 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Found: RyanJK5 posted it to Show HN. Show HN
  2. Day-7 check recorded by Kip (details)
  3. Day-30 check recorded by Kip (details)

Quick answers

When was rjk-duck released?
No dated release record is available. Kip found it on Show HN on 14 Jul 2026.
What does rjk-duck run on?
Library.
Is rjk-duck free?
It is open source, so the code is free to read and run; check the licence for terms.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
Product link checkryanjk5.github.io

Stable ID hn-48905914. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.

Share

Similar tools

More in Developer tools

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.