Skip to content

Commit 4136d50

Browse files
committed
BigInt::operator= for unsigned long (aka std::size_t)
1 parent 77ffa24 commit 4136d50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/big-int/bigint.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public:
242242
BigInt &operator/= (llong_t) _fast;
243243
BigInt &operator%= (llong_t) _fast;
244244

245+
BigInt &operator= (unsigned long x) { return (*this)=(ullong_t)x; }
245246
BigInt &operator+= (unsigned long x) { return (*this)+=(ullong_t)x; }
246247
BigInt &operator-= (unsigned long x) { return (*this)-=(ullong_t)x; }
247248
BigInt &operator*= (unsigned long x) { return (*this)*=(ullong_t)x; }

0 commit comments

Comments
 (0)