diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-10-02 14:19:45 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-10-02 14:19:45 +0200 |
| commit | 946b4650b6ff9f63b05723a2c7649424ea3231da (patch) | |
| tree | f0f8045c008d343b903559d954484c416580abc9 | |
| parent | 514aeead63e56240083b931aa36864a74f9d2f11 (diff) | |
fix postfix StronglyTypedInteger::operator{++,--}
| -rw-r--r-- | src/units.hh | 4 |
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); } |
