abacus: bignum: add operator bool
This commit is contained in:
parent
c9811fce44
commit
4b85d22923
|
@ -115,6 +115,10 @@ public:
|
||||||
return !(lhs < rhs);
|
return !(lhs < rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
explicit operator bool() {
|
||||||
|
return !is_zero();
|
||||||
|
}
|
||||||
|
|
||||||
bool is_zero() const;
|
bool is_zero() const;
|
||||||
bool is_positive() const;
|
bool is_positive() const;
|
||||||
bool is_negative() const;
|
bool is_negative() const;
|
||||||
|
|
Loading…
Reference in a new issue