diff --git a/src/Math/Functions.h b/src/Math/Functions.h index a78e5d06c..6209b629a 100644 --- a/src/Math/Functions.h +++ b/src/Math/Functions.h @@ -39,12 +39,16 @@ namespace Magnum { namespace Math { #ifndef DOXYGEN_GENERATING_OUTPUT namespace Implementation { template struct Pow { - template inline constexpr T operator()(T base) const { - return base*Pow()(base); + Pow() = delete; + + template inline constexpr static T pow(T base) { + return base*Pow::pow(base); } }; template<> struct Pow<0> { - template inline constexpr T operator()(T) const { return 1; } + Pow() = delete; + + template inline constexpr static T pow(T) { return 1; } }; } #endif @@ -55,7 +59,7 @@ namespace Implementation { * Returns integral power of base to the exponent. */ template inline constexpr T pow(T base) { - return Implementation::Pow()(base); + return Implementation::Pow::pow(base); } /**