Constructors

Synopses

Declared in <uint256.h>

Constructs a zero‐valued uint256.

constexpr
uint256() = default;

Constructs a uint256 at compile time from a hex string.

consteval
explicit
uint256(std::string_view hex_str);

Constructs a uint256 from a single byte constant between 1 and 255.

constexpr
explicit
uint256(uint8_t v);

Constructs a uint256 by copying bytes from a span.

constexpr
explicit
uint256(std::span<unsigned char const> vch);

Parameters

Name

Description

hex_str

A hex string that must fit the 256‐bit blob exactly.

v

The byte value placed in the first position of the blob.

vch

A span of exactly 32 bytes to copy into the blob.

Created with MrDocs