abacus: bignum: add operator bool

This commit is contained in:
Bruno BELANYI 2021-08-23 16:30:10 +02:00
parent c9811fce44
commit 4b85d22923

View file

@ -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;