From b87917a1e163039c37b2079ce9ab979eb9a53d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 20 Oct 2015 23:46:07 +0200 Subject: [PATCH] Math: fix build on Clang and GCC < 5.2. MSVC 2015 worked flawlessly. I don't know what error is a compiler bug and what's okay anymore. --- src/Magnum/Math/Dual.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)}; }