#pragma once #include #include class number { public: number() = default; /** * \brief Return the result of the addition of a number and this number. * * \param n The number to add to this number. */ number operator+(const number &n) const; /** * \brief Tells whether the number passed as parameter is strictly less * than this number. * * \param n The number to compare with this number. */ bool operator<(const number &n) const; /** * \brief Tells whether the number passed as parameter is strictly greater * than this number. * * \param n The number to compare with this number. */ bool operator>(const number &n) const; /** * \brief Tells whether the number passed as parameter is less than or * equal to this number. * * \param n The number to compare with this number. */ bool operator<=(const number &n) const; /** * \brief Tells whether the number passed as parameter is greater than or * equal to this number. * * \param n The number to compare with this number. */ bool operator>=(const number &n) const; /** * \brief Tells whether the number passed as parameter is equal to this * number. * * \param n The number to compare with this number. */ bool operator==(const number &n) const; /** * \brief Tells whether the number passed as parameter is not equal to this * number. * * \param n The number to compare with this number. */ bool operator!=(const number &n) const; private: /* First item is the least significant. */ std::list _operands; };