summaryrefslogtreecommitdiff
path: root/number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'number.cpp')
-rw-r--r--number.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/number.cpp b/number.cpp
index c337a34..57dbcae 100644
--- a/number.cpp
+++ b/number.cpp
@@ -149,6 +149,25 @@ number::operator!=(const number &n) const
}
/* }}} */
+/* Assignment operators {{{ */
+
+number &
+number::operator+=(const number &n)
+{
+ *this = *this + n;
+
+ return *this;
+}
+
+number &
+number::operator++()
+{
+ *this = *this + 1;
+
+ return *this;
+}
+
+/* }}} */
std::ostream &
operator<<(std::ostream &os, const number &n)