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 and uint128 can be used directly with the Boost.Random engines and distributions such as 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 and uint128:
| 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.