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
Parses an integer value from a string. Reads a sign (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 );
+ 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
[View in Compiler Explorer]static_assert (xte ::big_int <>::parse ("123" ) ==123 );