|
cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Backports related to Standard Header <random>
Including the header brings up <random>'s features, accounting for eg.: location being std::tr1::random... where set up in C++03, as well as changes to their names in certain compiler versions before C++11 was finalized.
Interfaces defined in this section:
default_random_engine — in cxxomfort defined as a typedef for ranlux24_base for C++03.subtract_with_carry and its typedefs ranlux24_base and ranlux48_base , for pre-C++11 compilers or when it's found to be broken.If CXXOFLAG_USE_INTERNAL_TR1 is enabled for pre-C++03 compilers, the following features are also enabled:
linear_congruential_generator for pre-C++03 compilers.subtract_with_carry_engine for pre-C++03 compilers.shuffle_order_engine and knuth_b for pre-C++03 compilers.Interfaces repointed here for GCC and Clang:
linear_congruent_engine and its named typedefs minstd , minstd0 , when they appear in TR1 with a different name.uniform_int_distribution , uniform_real_distribution , when they appear in TR1 with a different name.Fixes to implementation issues, in cxxomfort::fix::.
randmo() - modulo-respecting call to rand().shuffle_order_engine - for broken std in MSVC 2010.knuth_b - for broken std in MSVC 2010.Pending:
generate_canonical complementary (C++11).uniform_int_distribution complementary (C++11).discrete_distribution complementary (C++11).The cxxomfort library adds a simple wrapper randmo() around the std::rand() function.
ranlux24_base as the default PRNG in cxxomfort. <random> backports. <random> backports.
1.8.13