Enabled previous commit under MSVC, introduced new feature toggle

This commit is contained in:
Martin Hořeňovský 2017-01-26 18:47:29 +01:00
parent c06afe438e
commit 60a9ac7e65
4 changed files with 17 additions and 3 deletions

View file

@ -13,7 +13,7 @@
#include <cmath>
#include <limits>
#if defined(CATCH_CPP11_OR_GREATER)
#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
#include <type_traits>
#endif
@ -45,7 +45,7 @@ namespace Detail {
return approx;
}
#if defined(CATCH_CPP11_OR_GREATER)
#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
friend bool operator == ( const T& lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula