From 83a6375263a5e8635a8a2387d1986a68b1669146 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 11 Nov 2013 19:11:17 +0000 Subject: [PATCH] Fix StronglyTypedInteger::operator%= --- src/units.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/units.hh b/src/units.hh index a99957f9..99e2db45 100644 --- a/src/units.hh +++ b/src/units.hh @@ -53,12 +53,12 @@ public: RealType operator--(int) { RealType backup(static_cast(*this)); --m_value; return backup; } - constexpr RealType operator-() { return RealType(-m_value); } + constexpr RealType operator-() const { return RealType(-m_value); } constexpr RealType operator%(RealType other) const { return RealType(m_value % other.m_value); } - constexpr RealType operator%=(RealType other) + RealType& operator%=(RealType other) { m_value %= other.m_value; return static_cast(*this); } constexpr bool operator==(RealType other) const