xte::big_int<T>::operator+=()

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


Definitions

#0
constexpr xte::big_int<T>& operator+=(const xte::big_int<T>& rhs) & noexcept(false);
Adds rhs to the big-integer. May throw if allocation fails.

#1
constexpr xte::big_int<T>& operator+=(xte::big_int<T>&& rhs) & noexcept(false);
Adds rhs to the big-integer. lhs is destructively moved-from. May throw if allocation fails.



Example

constexpr auto u64_max = 18446744073709551615ull;
xte::big_int n = u64_max;
n += u64_max;
std::println("{}", n);
Output:
36893488147419103230
[View in Compiler Explorer]