Skip to content

v2.0.0

Latest

Choose a tag to compare

@ilqvya ilqvya released this 11 Oct 05:14
· 7 commits to master since this release

Highlights & New Features

  • Modern Namespace & Headers: Renamed include path to <ilqvya/random.hpp> and namespace to ilqvya::random. Maintained full backward compatibility through <effolkronium/random.hpp>.
  • C++20 Modules Support: Header units and module interface import ilqvya.random; enabled when compiling with C++20 modules support.
  • C++26 Reflection: Native static reflection support for automatic enum value generation and selection with -freflection.
  • Comprehensive Standard Support: Fully tested across C++11, C++14, C++17, C++20, C++23, and C++26 on GCC, Clang, AppleClang, and MSVC.
  • UUID & ID Generation (RFC 9562 & Specification-Compliant):
    • uuid_version::v4: Standard random UUID.
    • uuid_version::v7: Time-ordered Unix epoch milliseconds with sub-millisecond atomic sequence counter monotonicity.
    • uuid_version::v1, v6, mongo_object_id, nil, and max.
  • New Distributions & Utilities:
    • Random::normal(mean, stddev), Random::exponential(lambda), Random::poisson(mean)
    • Random::get_string(len, [charset]) with support for char, wchar_t, char16_t, char32_t (preventing surrogate pairs and invalid codepoints)
    • Random::get_hex(len, [uppercase])
  • Robust Range & Container APIs:
    • Random::sample, Random::choice, Random::shuffle, and Random::fill with perfect forwarding and rvalue container support.
    • Safe bounds, overflow protection on integer and real weights, and safe container reservation.
  • Quality Assurance:
    • 100% test coverage verified with gcov/lcov.
    • Zero defect findings on Coverity Scan static analysis.