diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp index 80a17ebbfb..687e88f0d7 100644 --- a/include/internal/catch_approx.hpp +++ b/include/internal/catch_approx.hpp @@ -45,14 +45,14 @@ namespace Detail { return approx; } #if defined(__cplusplus) && __cplusplus >= 201103L - template ::value>::type> + template ::value>::type> friend bool operator == ( const T& lhs, Approx const& rhs ) { // Thanks to Richard Harris for his help refining this formula - auto lhs_v = (double)lhs; + auto lhs_v = double(lhs); return fabs( lhs_v - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs_v), fabs(rhs.m_value) ) ); } - template ::value>::type> + template ::value>::type> friend bool operator == ( Approx const& lhs, const T& rhs ) { return operator==( rhs, lhs ); }