diff --git a/src/Math/Dual.h b/src/Math/Dual.h index 43e3e1eca..5e3b6f884 100644 --- a/src/Math/Dual.h +++ b/src/Math/Dual.h @@ -27,6 +27,8 @@ namespace Magnum { namespace Math { /** @brief %Dual number */ template class Dual { + template friend class Dual; + public: /** * @brief Default constructor @@ -134,7 +136,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] */ - inline Dual operator/(const Dual& other) const { + template inline Dual operator/(const Dual& other) const { return {_real/other._real, (_dual*other._real - _real*other._dual)/(other._real*other._real)}; }