xte::big_int<T>::parse.operator()()

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

Makes xte::big_int<T>::parse callable like a static member function.


Definition

template<xte::is_int Radix = xte::uz>
[[nodiscard]] static constexpr xte::big_int<T> operator()(xte::string_view string, Radix radix = 10, const xte::number_format_config& config = {}) noexcept(false);
Parses an integer value from a string. Reads a sign (+ or -), then reads the rest of the string or until a non-digit character is found. Negative radices are supported. May throw if allocation fails.



Example

static_assert(xte::big_int<>::parse("123") == 123);
[View in Compiler Explorer]