summaryrefslogtreecommitdiff
path: root/include/o3tl/strong_int.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/o3tl/strong_int.hxx')
-rw-r--r--include/o3tl/strong_int.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/o3tl/strong_int.hxx b/include/o3tl/strong_int.hxx
index 006a36c8900f..3db958212229 100644
--- a/include/o3tl/strong_int.hxx
+++ b/include/o3tl/strong_int.hxx
@@ -112,6 +112,11 @@ public:
strong_int operator--(int) { UNDERLYING_TYPE nOldValue = m_value; --m_value; return strong_int(nOldValue); }
strong_int& operator+=(strong_int const & other) { m_value += other.m_value; return *this; }
strong_int& operator-=(strong_int const & other) { m_value -= other.m_value; return *this; }
+ strong_int& operator%=(strong_int const & other) { m_value %= other.m_value; return *this; }
+ [[nodiscard]]
+ strong_int operator%(strong_int const & other) const { return strong_int(m_value % other.m_value); }
+ [[nodiscard]]
+ strong_int operator-() const { return strong_int(-m_value); }
bool anyOf(strong_int v) const {
return *this == v;