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

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


Definition

constexpr xte::big_int<T>& operator<<=(const xte::big_int<T>& rhs) & noexcept(false);
Shifts the bits of the big-integer leftward, or rightward if rhs is negative. May throw if allocation fails.



Example

xte::big_int n = 1;
n <<= 999;
std::println("{}", n);
Output:
5357543035931336604742125245300009052807024058527668037218751941851755255624680612465991894078479290637973364587765734125935726428461570217992288787349287401967283887412115492710537302531185570938977091076523237491790970633699383779582771973038531457285598238843271083830214915826312193418602834034688
[View in Compiler Explorer]