Boost.Random Support
#include <boost/int128/random.hpp>
Including this header specializes the traits that Boost.Random uses to reason about integer types, so that int128_t and uint128_t can be used directly with the Boost.Random engines and distributions (for example boost::random::uniform_int_distribution).
This header requires Boost.Random to be available.
The following specializations are provided in namespace boost::random::traits for both int128_t and uint128_t:
| Trait | Purpose |
|---|---|
|
Reports both types as integral. |
|
Reports |
|
Provide the unsigned type mapping Boost.Random uses when generating values. |
|
Provide the unsigned-or-unbounded type mapping Boost.Random uses. |
These specializations live in boost::random::traits, not boost::int128.
|
An example combining Boost.Random with the library types is available on the examples page.