mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Enabled previous commit under MSVC, introduced new feature toggle
This commit is contained in:
@@ -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
|
||||
|
@@ -19,6 +19,8 @@
|
||||
// CATCH_CONFIG_CPP11_LONG_LONG : is long long supported?
|
||||
// CATCH_CONFIG_CPP11_OVERRIDE : is override supported?
|
||||
// CATCH_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr)
|
||||
// CATCH_CONFIG_CPP11_SHUFFLE : is std::shuffle supported?
|
||||
// CATCH_CONFIG_CPP11_TYPE_TRAITS : are type_traits and enable_if supported?
|
||||
|
||||
// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported?
|
||||
|
||||
@@ -116,6 +118,7 @@
|
||||
#define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
||||
#define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
||||
#define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE
|
||||
#define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER
|
||||
@@ -184,6 +187,9 @@
|
||||
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE)
|
||||
# define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE
|
||||
# endif
|
||||
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS)
|
||||
# define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS
|
||||
# endif
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
@@ -224,6 +230,9 @@
|
||||
#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11)
|
||||
# define CATCH_CONFIG_CPP11_SHUFFLE
|
||||
#endif
|
||||
# if defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_NO_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_NO_CPP11)
|
||||
# define CATCH_CONFIG_CPP11_TYPE_TRAITS
|
||||
# endif
|
||||
|
||||
#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
|
||||
# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
|
||||
|
Reference in New Issue
Block a user