2013-04-16 23:55:31 +02:00
|
|
|
/*
|
|
|
|
* Created by Phil on 15/04/2013.
|
|
|
|
* Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
|
|
|
|
*
|
|
|
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
*/
|
|
|
|
#ifndef TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
|
|
|
|
#define TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
|
|
|
|
|
2015-05-19 19:37:58 +02:00
|
|
|
// Detect a number of compiler features - mostly C++11/14 conformance - by compiler
|
|
|
|
// The following features are defined:
|
|
|
|
//
|
|
|
|
// CATCH_CONFIG_CPP11_NULLPTR : is nullptr supported?
|
|
|
|
// CATCH_CONFIG_CPP11_NOEXCEPT : is noexcept supported?
|
|
|
|
// CATCH_CONFIG_CPP11_GENERATED_METHODS : The delete and default keywords for compiler generated methods
|
|
|
|
// CATCH_CONFIG_CPP11_IS_ENUM : std::is_enum is supported?
|
|
|
|
// CATCH_CONFIG_CPP11_TUPLE : std::tuple is supported
|
2015-07-23 20:03:33 +02:00
|
|
|
// CATCH_CONFIG_CPP11_LONG_LONG : is long long supported?
|
2015-08-05 20:02:17 +02:00
|
|
|
// CATCH_CONFIG_CPP11_OVERRIDE : is override supported?
|
2015-08-11 09:09:41 +02:00
|
|
|
// CATCH_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr)
|
2017-01-26 18:47:29 +01:00
|
|
|
// CATCH_CONFIG_CPP11_SHUFFLE : is std::shuffle supported?
|
|
|
|
// CATCH_CONFIG_CPP11_TYPE_TRAITS : are type_traits and enable_if supported?
|
2015-05-19 19:37:58 +02:00
|
|
|
|
|
|
|
// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported?
|
|
|
|
|
|
|
|
// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported?
|
2015-12-15 08:50:51 +01:00
|
|
|
// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported?
|
2017-02-06 01:43:53 +01:00
|
|
|
// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?
|
2017-02-15 17:57:22 +01:00
|
|
|
// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported?
|
2015-08-11 09:09:41 +02:00
|
|
|
// ****************
|
|
|
|
// Note to maintainers: if new toggles are added please document them
|
|
|
|
// in configuration.md, too
|
|
|
|
// ****************
|
2015-05-19 19:37:58 +02:00
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
// In general each macro has a _NO_<feature name> form
|
|
|
|
// (e.g. CATCH_CONFIG_CPP11_NO_NULLPTR) which disables the feature.
|
|
|
|
// Many features, at point of detection, define an _INTERNAL_ macro, so they
|
|
|
|
// can be combined, en-mass, with the _NO_ forms later.
|
|
|
|
|
|
|
|
// All the C++11 features can be disabled with CATCH_CONFIG_NO_CPP11
|
2013-04-16 23:55:31 +02:00
|
|
|
|
2016-06-09 09:15:57 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
# if __cplusplus >= 201103L
|
|
|
|
# define CATCH_CPP11_OR_GREATER
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# if __cplusplus >= 201402L
|
|
|
|
# define CATCH_CPP14_OR_GREATER
|
|
|
|
# endif
|
|
|
|
|
2016-02-29 09:01:06 +01:00
|
|
|
#endif
|
|
|
|
|
2013-12-14 15:32:26 +01:00
|
|
|
#ifdef __clang__
|
|
|
|
|
2014-04-23 19:19:19 +02:00
|
|
|
# if __has_feature(cxx_nullptr)
|
2015-06-30 09:41:55 +02:00
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
2014-04-23 19:19:19 +02:00
|
|
|
# endif
|
2013-12-14 15:32:26 +01:00
|
|
|
|
2014-04-23 19:19:19 +02:00
|
|
|
# if __has_feature(cxx_noexcept)
|
2015-06-30 09:41:55 +02:00
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
2014-04-23 19:19:19 +02:00
|
|
|
# endif
|
2013-12-14 15:32:26 +01:00
|
|
|
|
2016-02-29 09:01:06 +01:00
|
|
|
# if defined(CATCH_CPP11_OR_GREATER)
|
2017-03-29 20:30:59 +02:00
|
|
|
# define CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \
|
|
|
|
_Pragma( "clang diagnostic push" ) \
|
|
|
|
_Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" )
|
|
|
|
# define CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \
|
|
|
|
_Pragma( "clang diagnostic pop" )
|
|
|
|
|
2017-02-15 10:38:38 +01:00
|
|
|
# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
|
|
|
|
_Pragma( "clang diagnostic push" ) \
|
|
|
|
_Pragma( "clang diagnostic ignored \"-Wparentheses\"" )
|
|
|
|
# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \
|
|
|
|
_Pragma( "clang diagnostic pop" )
|
2016-02-29 09:01:06 +01:00
|
|
|
# endif
|
|
|
|
|
2013-12-14 15:32:26 +01:00
|
|
|
#endif // __clang__
|
|
|
|
|
2017-02-15 17:57:22 +01:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2017-04-20 21:02:25 +02:00
|
|
|
// We know some environments not to support full POSIX signals
|
|
|
|
#if defined(__CYGWIN__) || defined(__QNX__)
|
2017-02-15 17:57:22 +01:00
|
|
|
|
|
|
|
# if !defined(CATCH_CONFIG_POSIX_SIGNALS)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
|
|
|
|
# endif
|
|
|
|
|
2017-04-20 21:02:25 +02:00
|
|
|
#endif
|
|
|
|
|
2017-07-31 10:47:42 +02:00
|
|
|
#ifdef __OS400__
|
|
|
|
# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
|
|
|
|
# define CATCH_CONFIG_COLOUR_NONE
|
|
|
|
#endif
|
2017-04-20 21:02:25 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Cygwin
|
|
|
|
#ifdef __CYGWIN__
|
|
|
|
|
2017-03-01 16:58:57 +01:00
|
|
|
// Required for some versions of Cygwin to declare gettimeofday
|
|
|
|
// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
|
|
|
|
# define _BSD_SOURCE
|
|
|
|
|
2017-02-15 17:57:22 +01:00
|
|
|
#endif // __CYGWIN__
|
|
|
|
|
2013-04-16 23:55:31 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Borland
|
|
|
|
#ifdef __BORLANDC__
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __BORLANDC__
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// EDG
|
|
|
|
#ifdef __EDG_VERSION__
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __EDG_VERSION__
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Digital Mars
|
|
|
|
#ifdef __DMC__
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __DMC__
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GCC
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
2016-02-29 09:01:06 +01:00
|
|
|
# if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
|
|
|
# endif
|
|
|
|
|
2017-02-15 10:38:38 +01:00
|
|
|
|
2015-07-27 19:34:21 +02:00
|
|
|
// - otherwise more recent versions define __cplusplus >= 201103L
|
|
|
|
// and will get picked up below
|
|
|
|
|
2013-04-16 23:55:31 +02:00
|
|
|
|
|
|
|
#endif // __GNUC__
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Visual C++
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
2017-02-06 01:43:53 +01:00
|
|
|
#define CATCH_INTERNAL_CONFIG_WINDOWS_SEH
|
|
|
|
|
2015-05-19 23:37:23 +02:00
|
|
|
#if (_MSC_VER >= 1600)
|
2015-06-30 09:41:55 +02:00
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
2015-08-11 09:09:41 +02:00
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR
|
2015-05-19 23:37:23 +02:00
|
|
|
#endif
|
|
|
|
|
2015-05-19 19:37:58 +02:00
|
|
|
#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015))
|
2015-06-30 09:41:55 +02:00
|
|
|
#define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
|
|
|
#define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
2017-01-07 12:58:01 +01:00
|
|
|
#define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE
|
2017-01-26 18:47:29 +01:00
|
|
|
#define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS
|
2015-05-19 19:37:58 +02:00
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:55:31 +02:00
|
|
|
#endif // _MSC_VER
|
|
|
|
|
2015-08-11 09:09:41 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-04-22 09:19:17 +02:00
|
|
|
// 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 )
|
2013-05-14 20:31:21 +02:00
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
#define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
2013-05-14 20:31:21 +02:00
|
|
|
|
2013-04-22 09:19:17 +02:00
|
|
|
#endif
|
2013-04-16 23:55:31 +02:00
|
|
|
|
2015-12-15 08:50:51 +01:00
|
|
|
// Use __COUNTER__ if the compiler supports it
|
|
|
|
#if ( defined _MSC_VER && _MSC_VER >= 1300 ) || \
|
2017-06-13 18:20:59 +02:00
|
|
|
( defined __GNUC__ && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 )) ) || \
|
2015-12-15 08:50:51 +01:00
|
|
|
( defined __clang__ && __clang_major__ >= 3 )
|
|
|
|
|
|
|
|
#define CATCH_INTERNAL_CONFIG_COUNTER
|
|
|
|
|
|
|
|
#endif
|
2016-02-29 09:01:06 +01:00
|
|
|
|
2014-03-20 12:48:19 +01:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// C++ language feature support
|
|
|
|
|
2015-05-19 19:37:58 +02:00
|
|
|
// catch all support for C++11
|
2016-02-29 09:01:06 +01:00
|
|
|
#if defined(CATCH_CPP11_OR_GREATER)
|
2015-05-19 19:37:58 +02:00
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_TUPLE
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_TUPLE
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
# ifndef CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
|
|
|
# define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
2015-05-19 19:37:58 +02:00
|
|
|
# endif
|
|
|
|
|
2015-07-23 20:03:33 +02:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG
|
|
|
|
# endif
|
|
|
|
|
2015-08-05 20:02:17 +02:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE
|
|
|
|
# endif
|
2015-08-11 09:09:41 +02:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR
|
|
|
|
# endif
|
2017-01-07 12:58:01 +01:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE
|
|
|
|
# endif
|
2017-01-26 18:47:29 +01:00
|
|
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS)
|
|
|
|
# define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS
|
|
|
|
# endif
|
2015-08-05 20:02:17 +02:00
|
|
|
|
2015-05-19 19:37:58 +02:00
|
|
|
#endif // __cplusplus >= 201103L
|
2014-03-20 12:48:19 +01:00
|
|
|
|
2015-06-30 09:41:55 +02:00
|
|
|
// Now set the actual defines based on the above + anything the user has configured
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NO_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_NO_CPP11)
|
|
|
|
# define CATCH_CONFIG_CPP11_NULLPTR
|
|
|
|
#endif
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NO_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_NO_CPP11)
|
|
|
|
# define CATCH_CONFIG_CPP11_NOEXCEPT
|
|
|
|
#endif
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_NO_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_NO_CPP11)
|
|
|
|
# define CATCH_CONFIG_CPP11_GENERATED_METHODS
|
|
|
|
#endif
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_NO_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_NO_CPP11)
|
|
|
|
# define CATCH_CONFIG_CPP11_IS_ENUM
|
|
|
|
#endif
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_CPP11_NO_TUPLE) && !defined(CATCH_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_NO_CPP11)
|
|
|
|
# define CATCH_CONFIG_CPP11_TUPLE
|
|
|
|
#endif
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS)
|
2015-07-23 20:03:33 +02:00
|
|
|
# define CATCH_CONFIG_VARIADIC_MACROS
|
|
|
|
#endif
|
2017-01-10 22:54:57 +01:00
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11)
|
2015-07-23 20:03:33 +02:00
|
|
|
# define CATCH_CONFIG_CPP11_LONG_LONG
|
2015-06-30 09:41:55 +02:00
|
|
|
#endif
|
2017-01-10 22:54:57 +01:00
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11)
|
2015-08-05 20:02:17 +02:00
|
|
|
# define CATCH_CONFIG_CPP11_OVERRIDE
|
|
|
|
#endif
|
2017-01-10 22:54:57 +01:00
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11)
|
2015-08-11 09:09:41 +02:00
|
|
|
# define CATCH_CONFIG_CPP11_UNIQUE_PTR
|
|
|
|
#endif
|
2017-01-14 22:00:51 +01:00
|
|
|
// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for
|
|
|
|
// analytics) because, at time of writing, __COUNTER__ is not properly handled by it.
|
|
|
|
// This does not affect compilation
|
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__)
|
2015-12-15 08:50:51 +01:00
|
|
|
# define CATCH_CONFIG_COUNTER
|
|
|
|
#endif
|
2017-01-10 22:54:57 +01:00
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11)
|
2017-01-07 12:58:01 +01:00
|
|
|
# define CATCH_CONFIG_CPP11_SHUFFLE
|
|
|
|
#endif
|
2017-01-26 18:47:29 +01:00
|
|
|
# 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
|
2017-02-06 01:43:53 +01:00
|
|
|
#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH)
|
|
|
|
# define CATCH_CONFIG_WINDOWS_SEH
|
|
|
|
#endif
|
2017-02-15 17:57:22 +01:00
|
|
|
// This is set by default, because we assume that unix compilers are posix-signal-compatible by default.
|
2017-03-29 20:30:59 +02:00
|
|
|
#if !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)
|
2017-02-15 17:57:22 +01:00
|
|
|
# define CATCH_CONFIG_POSIX_SIGNALS
|
|
|
|
#endif
|
2015-06-30 09:41:55 +02:00
|
|
|
|
2016-02-29 09:01:06 +01:00
|
|
|
#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
|
|
|
|
# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
|
2017-02-15 10:38:38 +01:00
|
|
|
# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
|
2016-02-29 09:01:06 +01:00
|
|
|
#endif
|
2017-03-29 20:30:59 +02:00
|
|
|
#if !defined(CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS)
|
|
|
|
# define CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS
|
|
|
|
# define CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS
|
|
|
|
#endif
|
2015-06-30 09:41:55 +02:00
|
|
|
|
2014-03-20 12:48:19 +01:00
|
|
|
// noexcept support:
|
2014-04-23 19:19:19 +02:00
|
|
|
#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
|
|
|
|
# define CATCH_NOEXCEPT noexcept
|
|
|
|
# define CATCH_NOEXCEPT_IS(x) noexcept(x)
|
|
|
|
#else
|
2014-03-20 12:48:19 +01:00
|
|
|
# define CATCH_NOEXCEPT throw()
|
|
|
|
# define CATCH_NOEXCEPT_IS(x)
|
|
|
|
#endif
|
|
|
|
|
2015-07-01 08:33:27 +02:00
|
|
|
// nullptr support
|
|
|
|
#ifdef CATCH_CONFIG_CPP11_NULLPTR
|
|
|
|
# define CATCH_NULL nullptr
|
|
|
|
#else
|
|
|
|
# define CATCH_NULL NULL
|
|
|
|
#endif
|
2015-06-30 09:41:55 +02:00
|
|
|
|
2015-08-05 20:02:17 +02:00
|
|
|
// override support
|
|
|
|
#ifdef CATCH_CONFIG_CPP11_OVERRIDE
|
|
|
|
# define CATCH_OVERRIDE override
|
|
|
|
#else
|
|
|
|
# define CATCH_OVERRIDE
|
|
|
|
#endif
|
|
|
|
|
2015-08-11 09:09:41 +02:00
|
|
|
// unique_ptr support
|
|
|
|
#ifdef CATCH_CONFIG_CPP11_UNIQUE_PTR
|
|
|
|
# define CATCH_AUTO_PTR( T ) std::unique_ptr<T>
|
|
|
|
#else
|
|
|
|
# define CATCH_AUTO_PTR( T ) std::auto_ptr<T>
|
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:55:31 +02:00
|
|
|
#endif // TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
|
|
|
|
|