xte ::big_int <T >::operator- ()
Defined in header <xte/math/big_int.hpp> Definitions
#0Returns another big-integer with the same magnitude but opposite sign. May throw if allocation fails.[[nodiscard ]]constexpr xte ::big_int <T >operator- ()const & noexcept (false );
#1
Returns another big-integer with the same magnitude but opposite sign. The old object is destructively moved-from.[[nodiscard ]]constexpr xte ::big_int <T >&& operator- ()&& noexcept ;
#2
Computes the difference of two big-integers. May throw if allocation fails.[[nodiscard ]]friend constexpr xte ::big_int <T >operator- (xte ::big_int <T >lhs ,const xte ::big_int <T >& rhs )noexcept (false );
#3
Computes the difference of two big-integers.[[nodiscard ]]friend constexpr xte ::big_int <T >operator- (xte ::big_int <T >lhs ,xte ::big_int <T >&& rhs )noexcept (false );
lhs is destructively moved-from. May throw if allocation fails.Example
[View in Compiler Explorer]constexpr auto i64_max =9223372036854775807 ;constexpr auto i64_min = -i64_max -1 ;static_assert (-(xte ::big_int (i64_min ) -i64_max ) ==18446744073709551615ull );