Skip to content

<xstd/ints/ext/boost/int128.hpp>

xstd::make_unsigned<boost::int128::int128>, xstd::make_signed<boost::int128::uint128>

// (1)
template<> struct make_unsigned<boost::int128::int128>;

// (2)
template<> struct make_signed<boost::int128::uint128>;

The pairing of Boost.Int128's two types, each with the other.

  1. The member type is boost::int128::uint128.
  2. The member type is boost::int128::int128.

Member types

Type Definition
type the other half of Boost.Int128's pair

Remarks

  • The specializations name the types without the _t suffix, the spelling after Boost.Int128's last release tag.
  • The header carries IWYU pragma: always_keep. Boost declares the pair in detail/ headers that no public Boost header re-exports, so the export stops one hop short of the declarations.

Notes

  • With the integer-class specializations each half is its own counterpart, the round trip is the identity, the cv-qualifiers carry over, and the pair's limits have the range of [iterator.concept.winc]/3.
  • With them, boost::int128::int128 models signed_integer and boost::int128::uint128 models unsigned_integer, so every facility constrained on the integer concepts takes them.
  • The mistakes that port from built-in code stay compile errors for the signed half: div with an int literal divisor, popcount, and align_up.
  • The header compiles on its own wherever Boost.Int128 is found.

See also

Entity Relation
make_signed, make_unsigned the traits it specializes
signed_integer, unsigned_integer what the pair models with it
hash_append_int hashes the pair as xstd's own 128-bit pair
absl::int128 the same for Abseil's pair