abacus: bignum: add operator bool
This commit is contained in:
parent
c9811fce44
commit
4b85d22923
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue