diff options
Diffstat (limited to 'number.h')
-rw-r--r-- | number.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -34,6 +34,12 @@ public: std::uint32_t to_uint32() const; /** + * \brief Return true if this number is not equal to 0. Otherwise, return + * false. + */ + explicit operator bool() const; + + /** * \brief Return the result of the addition of a number and this number. * * \param n The number to add to this number. @@ -105,6 +111,11 @@ public: bool operator!=(const number &n) const; /** + * \brief Tells whether this number evaluates to false. + */ + bool operator!() const; + + /** * \brief Add a number to this number. * * \param n Number to add to this number. |