summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-10-02 14:19:45 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-10-02 14:19:45 +0200
commit946b4650b6ff9f63b05723a2c7649424ea3231da (patch)
treef0f8045c008d343b903559d954484c416580abc9 /src
parent514aeead63e56240083b931aa36864a74f9d2f11 (diff)
fix postfix StronglyTypedInteger::operator{++,--}
Diffstat (limited to 'src')
-rw-r--r--src/units.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/units.hh b/src/units.hh
index f5137e99..d4988ccf 100644
--- a/src/units.hh
+++ b/src/units.hh
@@ -42,10 +42,10 @@ public:
{ --m_value; return static_cast<RealType&>(*this); }
RealType operator++(int)
- { RealType backup(*this); ++m_value; return backup; }
+ { RealType backup(static_cast<RealType&>(*this)); ++m_value; return backup; }
RealType operator--(int)
- { RealType backup(*this); --m_value; return backup; }
+ { RealType backup(static_cast<RealType&>(*this)); --m_value; return backup; }
constexpr RealType operator-() { return RealType(-m_value); }