cxxomfort
rel.20210622
Simple backports for C++ - http://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 ranlux24_base for C++03.subtract_with_carry
and its typedefs ranlux24_base
and ranlux48_base
, for pre-C++11 compilers.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 / non-backport interfaces (cxxomfort::fix
):
randmo()
- modulo-respecting call to rand()
.cxxomfort::fix::shuffle_order_engine
- for broken std in MSVC 2010.cxxomfort::fix::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).