Directory Structure

The entire library can be consumed via <boost/int128.hpp>, or by independently selecting any of the library headers.

Header Description

<boost/int128.hpp>

Convenience header (includes most headers below; does not include charconv.hpp, fmt_format.hpp, or random.hpp)

<boost/int128/bit.hpp>

Bit manipulation functions

<boost/int128/charconv.hpp>

Character conversion (to_chars/from_chars); requires Boost.Charconv headers

<boost/int128/climits.hpp>

C-style limit macros (BOOST_INT128_INT128_MAX, etc.)

<boost/int128/cstdlib.hpp>

Division with quotient and remainder (div)

<boost/int128/fmt_format.hpp>

{fmt} library support; requires the {fmt} library

<boost/int128/format.hpp>

C++20 std::format support

<boost/int128/hash.hpp>

std::hash specializations for int128_t and uint128_t

<boost/int128/int128.hpp>

Core type definitions (uint128_t, int128_t)

<boost/int128/iostream.hpp>

Stream insertion/extraction operators

<boost/int128/limits.hpp>

std::numeric_limits specializations

<boost/int128/literals.hpp>

User-defined literals (_u128, _i128)

<boost/int128/numeric.hpp>

Numeric functions (gcd, lcm, saturating arithmetic)

<boost/int128/random.hpp>

Traits for usage with Boost.Random

<boost/int128/string.hpp>

to_string overloads

<boost/int128/utilities.hpp>

Modular exponentiation, integer power, integer square root, and checked arithmetic