summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-10-22 05:17:33 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-10-22 05:17:33 -0700
commitf16847ab29d474e2b20d7f8c9f3a0f229b54c850 (patch)
tree1b66e989cb28ce42070abcf739157170b1f780ff /include/value.h
parent0914ea9fc9795cc997f8fdb22a8c678ad0ff40ba (diff)
{auto} support for modulus operator
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h
index ed6cec4..bb7f354 100644
--- a/include/value.h
+++ b/include/value.h
@@ -163,6 +163,21 @@ public:
Value &operator/=(const std::string &value);
Value &operator/=(const char *value);
Value &operator/=(double value);
+
+ /**
+ * Divide the object with a certain value, and get the rest
+ * @param value
+ * @return Value
+ */
+ Value &operator%=(const Value &value);
+ Value &operator%=(int16_t value);
+ Value &operator%=(int32_t value);
+ Value &operator%=(int64_t value);
+ Value &operator%=(bool value);
+ Value &operator%=(char value);
+ Value &operator%=(const std::string &value);
+ Value &operator%=(const char *value);
+ Value &operator%=(double value);
/**
* Assignment operator
@@ -223,6 +238,21 @@ public:
Value operator/(const std::string &value);
Value operator/(const char *value);
Value operator/(double value);
+
+ /**
+ * Modulus operator
+ * @param value
+ * @return Value
+ */
+ Value operator%(const Value &value);
+ Value operator%(int16_t value);
+ Value operator%(int32_t value);
+ Value operator%(int64_t value);
+ Value operator%(bool value);
+ Value operator%(char value);
+ Value operator%(const std::string &value);
+ Value operator%(const char *value);
+ Value operator%(double value);
/**
* The type of object