diff --git a/src/Magnum/Math/Dual.h b/src/Magnum/Math/Dual.h index adb43622a..a7d728b63 100644 --- a/src/Magnum/Math/Dual.h +++ b/src/Magnum/Math/Dual.h @@ -153,7 +153,7 @@ template class Dual { * \hat a \hat b = a_0 b_0 + \epsilon (a_0 b_\epsilon + a_\epsilon b_0) * @f] */ - template auto operator*(const Dual& other) const -> Dual { + template auto operator*(const Dual& other) const -> Dual()*std::declval())> { return {_real*other._real, _real*other._dual + _dual*other._real}; } @@ -164,7 +164,7 @@ template class Dual { * \frac{\hat a}{\hat b} = \frac{a_0}{b_0} + \epsilon \frac{a_\epsilon b_0 - a_0 b_\epsilon}{b_0^2} * @f] */ - template auto operator/(const Dual& other) const -> Dual { + template auto operator/(const Dual& other) const -> Dual()/std::declval())> { return {_real/other._real, (_dual*other._real - _real*other._dual)/(other._real*other._real)}; }