Skip to content

Conversation

@ulfben
Copy link

@ulfben ulfben commented Nov 29, 2025

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant