absl::MakeUint128

Constructs a uint128 numeric value from two 64-bit unsigned integers.

Synopsis

Declared in <absl/numeric/int128.h>

constexpr
uint128
MakeUint128(
    uint64_t high,
    uint64_t low);

Description

This factory function is the only way to construct a uint128 from integer values greater than 2^64.

Example:

absl::uint128 big = absl::MakeUint128(1, 0);

Return Value

A uint128 whose high and low halves are high and low.

Parameters

NameDescription
highThe high-order 64 bits of the result.
lowThe low-order 64 bits of the result.