mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Compiler capabilities clean-up
- renamed CATCH_SFINAE -> CATCH_CONFIG_SFINAE - moved variadic macros detection into catch_compiler_capabilities.h
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include "catch_context.h"
|
||||
#include "catch_common.h"
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
#include "internal/catch_compiler_capabilities.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace Catch {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#ifdef __BORLANDC__
|
||||
|
||||
#if (__BORLANDC__ > 0x582 )
|
||||
//#define CATCH_SFINAE // Not confirmed
|
||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
||||
#endif
|
||||
|
||||
#endif // __BORLANDC__
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifdef __EDG_VERSION__
|
||||
|
||||
#if (__EDG_VERSION__ > 238 )
|
||||
//#define CATCH_SFINAE // Not confirmed
|
||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
||||
#endif
|
||||
|
||||
#endif // __EDG_VERSION__
|
||||
@@ -35,7 +35,7 @@
|
||||
#ifdef __DMC__
|
||||
|
||||
#if (__DMC__ > 0x840 )
|
||||
//#define CATCH_SFINAE // Not confirmed
|
||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
||||
#endif
|
||||
|
||||
#endif // __DMC__
|
||||
@@ -47,12 +47,12 @@
|
||||
#if __GNUC__ < 3
|
||||
|
||||
#if (__GNUC_MINOR__ >= 96 )
|
||||
#define CATCH_SFINAE
|
||||
#define CATCH_CONFIG_SFINAE
|
||||
#endif
|
||||
|
||||
#elif __GNUC__ >= 3
|
||||
|
||||
// #define CATCH_SFINAE // Taking this out completely for now
|
||||
// #define CATCH_CONFIG_SFINAE // Taking this out completely for now
|
||||
|
||||
#endif // __GNUC__ < 3
|
||||
|
||||
@@ -64,11 +64,18 @@
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
|
||||
//#define CATCH_SFINAE // Not confirmed
|
||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
// Use variadic macros if the compiler supports them
|
||||
#if ( defined _MSC_VER && _MSC_VER > 1400 && !defined __EDGE__) || \
|
||||
( defined __WAVE__ && __WAVE_HAS_VARIADICS ) || \
|
||||
( defined __GNUC__ && __GNUC__ >= 3 ) || \
|
||||
( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L )
|
||||
#define CATCH_CONFIG_VARIADIC_MACROS
|
||||
#endif
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "catch_capture.hpp"
|
||||
#include "catch_totals.hpp"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@@ -24,7 +24,7 @@ namespace Catch {
|
||||
char sizer[2];
|
||||
};
|
||||
|
||||
#ifdef CATCH_SFINAE
|
||||
#ifdef CATCH_CONFIG_SFINAE
|
||||
|
||||
template<bool> struct NotABooleanExpression;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Catch {
|
||||
template<> struct SizedIf<sizeof(TrueType)> : TrueType {};
|
||||
template<> struct SizedIf<sizeof(FalseType)> : FalseType {};
|
||||
|
||||
#endif // CATCH_SFINAE
|
||||
#endif // CATCH_CONFIG_SFINAE
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "catch_common.h"
|
||||
#include "catch_interfaces_testcase.h"
|
||||
#include "internal/catch_compiler_capabilities.h"
|
||||
|
||||
namespace Catch {
|
||||
|
||||
|
@@ -24,8 +24,8 @@ namespace Detail {
|
||||
|
||||
// SFINAE is currently disabled by default for all compilers.
|
||||
// If the non SFINAE version of IsStreamInsertable is ambiguous for you
|
||||
// and your compiler supports SFINAE, try #defining CATCH_SFINAE
|
||||
#ifdef CATCH_SFINAE
|
||||
// and your compiler supports SFINAE, try #defining CATCH_CONFIG_SFINAE
|
||||
#ifdef CATCH_CONFIG_SFINAE
|
||||
|
||||
template<typename T>
|
||||
class IsStreamInsertableHelper {
|
||||
|
Reference in New Issue
Block a user