Directory Structure

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

Header Description

<boost/int256.hpp>

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

<boost/int256/bit.hpp>

Bit manipulation functions

<boost/int256/byte_conversions.hpp>

Big-endian and little-endian byte order conversions

<boost/int256/charconv.hpp>

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

<boost/int256/climits.hpp>

C-style limit macros (BOOST_INT256_UINT256_MAX)

<boost/int256/cstdlib.hpp>

Division with quotient and remainder (div)

<boost/int256/fmt_format.hpp>

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

<boost/int256/format.hpp>

C++20 std::format support

<boost/int256/hash.hpp>

std::hash specialization for uint256

<boost/int256/int256.hpp>

Core type definition (uint256)

<boost/int256/iostream.hpp>

Stream insertion/extraction operators

<boost/int256/limits.hpp>

std::numeric_limits specialization

<boost/int256/literals.hpp>

User-defined literals (_u256, _U256)

<boost/int256/numeric.hpp>

Numeric functions (gcd, lcm, saturating arithmetic, integer division)

<boost/int256/random.hpp>

Traits for usage with Boost.Random

<boost/int256/string.hpp>

to_string overloads

<boost/int256/utilities.hpp>

Modular arithmetic, integer power, integer square root, checked arithmetic, and signedness-safe comparisons

The implementation lives under include/boost/int256/detail/ and is not part of the public interface. The remaining top-level directories of the repository are:

Directory Contents

doc/

This documentation (Antora)

example/

The programs shown in Examples, each built and run as a test

extra/

The amalgamation script, the generated single header, and the debugger pretty printers

module/

The C++20 module interface unit int256.cppm and its build files

ports/

The vcpkg port

test/

The test suite, including the CUDA and SYCL suites, the compile-fail tests, the fuzzing harnesses and differential test against wide-integer, and the benchmarks