spec icon indicating copy to clipboard operation
spec copied to clipboard

Add cpp_ulid to the C++ implementations

Open ulfben opened this issue 2 months ago • 0 comments

Hi! I’d like to propose adding cpp_ulid to the list of C++ implementations.

It’s a modern, single-header implementation targeting C++20 and newer.

Try it on compiler explorer

The focus is on perf, correctness, and adherence to the ULID specification:

  • header-only and easy to integrate
  • compiles cleanly on gcc, clang and msvc
  • supports both standard and monotonic ULID generation
  • constexpr-friendly implementation where possible
  • comes with a comprehensive GoogleTest-based test suite covering encoding, decoding, canonicalization, monotonicity, and byte-level correctness
  • aims to follow the ULID spec closely, including handling of ambiguous characters and canonical output

Happy to maintain it and respond to any feedback. Let me know if there’s anything you’d like me to adjust!

ulfben avatar Nov 29 '25 14:11 ulfben