xte::big_int::big_int()

Defined in header <xte/math/big_int.hpp>


Definitions

#0
template<xte::is_arithmetic T = xte::umax>
[[nodiscard]] explicit(!xte::is_int<T>)
constexpr big_int(T x = 0) noexcept(false);
Constructs from an integer or finite floating-point value.

#1
[[nodiscard]] explicit(false) constexpr big_int(const xte::big_int&) noexcept(false) = default;

#2
[[nodiscard]] explicit(false) constexpr big_int(xte::big_int&&) noexcept = default;
The moved-from big-integer is left in an unspecified state.

#3
template<typename Range = xte::array<xte::umax>>
[[nodiscard]] constexpr big_int(std::from_range_t, Range&& range, bool neg = false) XTE_CONSTRUCTS(/* ... */)
Copies qualifiers from Range onto its element type. Requires that the element type of the given range is convertible to xte::umax.

#4
template<xte::is_int Radix = xte::uz>
[[nodiscard]] explicit constexpr big_int(xte::string_view string, Radix radix = 10, const xte::number_format_config& config = {}) noexcept(false);
Constructs from a string representation of an integer.



Example

static_assert(xte::big_int("FF", 16) == 255);
[View in Compiler Explorer]