Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:27

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
0008 #ifndef CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
0009 #define CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
0010 
0011 // Detect a number of compiler features - by compiler
0012 // The following features are defined:
0013 //
0014 // CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?
0015 // CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported?
0016 // CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled?
0017 // ****************
0018 // Note to maintainers: if new toggles are added please document them
0019 // in configuration.md, too
0020 // ****************
0021 
0022 // In general each macro has a _NO_<feature name> form
0023 // (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature.
0024 // Many features, at point of detection, define an _INTERNAL_ macro, so they
0025 // can be combined, en-mass, with the _NO_ forms later.
0026 
0027 #include <catch2/internal/catch_platform.hpp>
0028 #include <catch2/catch_user_config.hpp>
0029 
0030 #ifdef __cplusplus
0031 
0032 #  if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
0033 #    define CATCH_CPP17_OR_GREATER
0034 #  endif
0035 
0036 #  if (__cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
0037 #    define CATCH_CPP20_OR_GREATER
0038 #  endif
0039 
0040 #endif
0041 
0042 // Only GCC compiler should be used in this block, so other compilers trying to
0043 // mask themselves as GCC should be ignored.
0044 #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) && !defined(__NVCOMPILER)
0045 #    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" )
0046 #    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "GCC diagnostic pop" )
0047 
0048 // This only works on GCC 9+. so we have to also add a global suppression of Wparentheses
0049 // for older versions of GCC.
0050 #    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
0051          _Pragma( "GCC diagnostic ignored \"-Wparentheses\"" )
0052 
0053 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \
0054          _Pragma( "GCC diagnostic ignored \"-Wunused-result\"" )
0055 
0056 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
0057          _Pragma( "GCC diagnostic ignored \"-Wunused-variable\"" )
0058 
0059 #    define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \
0060          _Pragma( "GCC diagnostic ignored \"-Wuseless-cast\"" )
0061 
0062 #    define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
0063          _Pragma( "GCC diagnostic ignored \"-Wshadow\"" )
0064 
0065 #    define CATCH_INTERNAL_CONFIG_USE_BUILTIN_CONSTANT_P
0066 
0067 #endif
0068 
0069 #if defined(__NVCOMPILER)
0070 #    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "diag push" )
0071 #    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "diag pop" )
0072 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress declared_but_not_referenced" )
0073 #endif
0074 
0075 #if defined(__CUDACC__) && !defined(__clang__)
0076 #  ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
0077 // New pragmas introduced in CUDA 11.5+
0078 #    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" )
0079 #    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "nv_diagnostic pop" )
0080 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" )
0081 #  else
0082 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress 177" )
0083 #  endif
0084 #endif
0085 
0086 // clang-cl defines _MSC_VER as well as __clang__, which could cause the
0087 // start/stop internal suppression macros to be double defined.
0088 #if defined(__clang__) && !defined(_MSC_VER)
0089 #    define CATCH_INTERNAL_CONFIG_USE_BUILTIN_CONSTANT_P
0090 #    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
0091 #    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "clang diagnostic pop" )
0092 #endif // __clang__ && !_MSC_VER
0093 
0094 #if defined(__clang__)
0095 
0096 #    define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
0097          _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \
0098          _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"")
0099 
0100 #    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
0101          _Pragma( "clang diagnostic ignored \"-Wparentheses\"" )
0102 
0103 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
0104          _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" )
0105 
0106 #    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
0107          _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
0108 
0109 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
0110          _Pragma( "clang diagnostic ignored \"-Wunused-template\"" )
0111 
0112 #    define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \
0113         _Pragma( "clang diagnostic ignored \"-Wcomma\"" )
0114 
0115 #    define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
0116         _Pragma( "clang diagnostic ignored \"-Wshadow\"" )
0117 
0118 #endif // __clang__
0119 
0120 // As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
0121 // which results in calls to destructors being emitted for each temporary,
0122 // without a matching initialization. In practice, this can result in something
0123 // like `std::string::~string` being called on an uninitialized value.
0124 //
0125 // For example, this code will likely segfault under IBM XL:
0126 // ```
0127 // REQUIRE(std::string("12") + "34" == "1234")
0128 // ```
0129 //
0130 // Similarly, NVHPC's implementation of `__builtin_constant_p` has a bug which
0131 // results in calls to the immediately evaluated lambda expressions to be
0132 // reported as unevaluated lambdas.
0133 // https://developer.nvidia.com/nvidia_bug/3321845.
0134 //
0135 // Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
0136 #if defined( __ibmxl__ ) || defined( __CUDACC__ ) || defined( __NVCOMPILER )
0137 #    define CATCH_INTERNAL_CONFIG_NO_USE_BUILTIN_CONSTANT_P
0138 #endif
0139 
0140 
0141 
0142 ////////////////////////////////////////////////////////////////////////////////
0143 // We know some environments not to support full POSIX signals
0144 #if defined( CATCH_PLATFORM_WINDOWS ) ||                                       \
0145     defined( CATCH_PLATFORM_PLAYSTATION ) ||                                   \
0146     defined( __CYGWIN__ ) ||                                                   \
0147     defined( __QNX__ ) ||                                                      \
0148     defined( __EMSCRIPTEN__ ) ||                                               \
0149     defined( __DJGPP__ ) ||                                                    \
0150     defined( __OS400__ )
0151 #    define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
0152 #else
0153 #    define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS
0154 #endif
0155 
0156 ////////////////////////////////////////////////////////////////////////////////
0157 // Assume that some platforms do not support getenv.
0158 #if defined( CATCH_PLATFORM_WINDOWS_UWP ) ||                                   \
0159     defined( CATCH_PLATFORM_PLAYSTATION ) ||                                   \
0160     defined( _GAMING_XBOX )
0161 #    define CATCH_INTERNAL_CONFIG_NO_GETENV
0162 #else
0163 #    define CATCH_INTERNAL_CONFIG_GETENV
0164 #endif
0165 
0166 ////////////////////////////////////////////////////////////////////////////////
0167 // Android somehow still does not support std::to_string
0168 #if defined(__ANDROID__)
0169 #    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
0170 #endif
0171 
0172 ////////////////////////////////////////////////////////////////////////////////
0173 // Not all Windows environments support SEH properly
0174 #if defined(__MINGW32__)
0175 #    define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
0176 #endif
0177 
0178 ////////////////////////////////////////////////////////////////////////////////
0179 // PS4
0180 #if defined(__ORBIS__)
0181 #    define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE
0182 #endif
0183 
0184 ////////////////////////////////////////////////////////////////////////////////
0185 // Cygwin
0186 #ifdef __CYGWIN__
0187 
0188 // Required for some versions of Cygwin to declare gettimeofday
0189 // see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
0190 #   define _BSD_SOURCE
0191 // some versions of cygwin (most) do not support std::to_string. Use the libstd check.
0192 // https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813
0193 # if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
0194            && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
0195 
0196 #    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
0197 
0198 # endif
0199 #endif // __CYGWIN__
0200 
0201 ////////////////////////////////////////////////////////////////////////////////
0202 // Visual C++
0203 #if defined(_MSC_VER)
0204 
0205 // We want to defer to nvcc-specific warning suppression if we are compiled
0206 // with nvcc masquerading for MSVC.
0207 #    if !defined( __CUDACC__ )
0208 #        define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
0209             __pragma( warning( push ) )
0210 #        define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
0211             __pragma( warning( pop ) )
0212 #    endif
0213 
0214 // Universal Windows platform does not support SEH
0215 // Or console colours (or console at all...)
0216 #  if defined(CATCH_PLATFORM_WINDOWS_UWP)
0217 #    define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32
0218 #  else
0219 #    define CATCH_INTERNAL_CONFIG_WINDOWS_SEH
0220 #  endif
0221 
0222 // MSVC traditional preprocessor needs some workaround for __VA_ARGS__
0223 // _MSVC_TRADITIONAL == 0 means new conformant preprocessor
0224 // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor
0225 #  if !defined(__clang__) // Handle Clang masquerading for msvc
0226 #    if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)
0227 #      define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
0228 #    endif // MSVC_TRADITIONAL
0229 #  endif // __clang__
0230 
0231 #endif // _MSC_VER
0232 
0233 #if defined(_REENTRANT) || defined(_MSC_VER)
0234 // Enable async processing, as -pthread is specified or no additional linking is required
0235 # define CATCH_INTERNAL_CONFIG_USE_ASYNC
0236 #endif // _MSC_VER
0237 
0238 ////////////////////////////////////////////////////////////////////////////////
0239 // Check if we are compiled with -fno-exceptions or equivalent
0240 #if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)
0241 #  define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED
0242 #endif
0243 
0244 
0245 ////////////////////////////////////////////////////////////////////////////////
0246 // Embarcadero C++Build
0247 #if defined(__BORLANDC__)
0248     #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN
0249 #endif
0250 
0251 ////////////////////////////////////////////////////////////////////////////////
0252 
0253 // RTX is a special version of Windows that is real time.
0254 // This means that it is detected as Windows, but does not provide
0255 // the same set of capabilities as real Windows does.
0256 #if defined(UNDER_RTSS) || defined(RTX64_BUILD)
0257     #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
0258     #define CATCH_INTERNAL_CONFIG_NO_ASYNC
0259     #define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32
0260 #endif
0261 
0262 #if !defined(_GLIBCXX_USE_C99_MATH_TR1)
0263 #define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER
0264 #endif
0265 
0266 // Various stdlib support checks that require __has_include
0267 #if defined(__has_include)
0268   // Check if string_view is available and usable
0269   #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
0270   #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
0271   #endif
0272 
0273   // Check if optional is available and usable
0274   #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
0275   #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
0276   #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
0277 
0278   // Check if byte is available and usable
0279   #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
0280   #    include <cstddef>
0281   #    if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0)
0282   #      define CATCH_INTERNAL_CONFIG_CPP17_BYTE
0283   #    endif
0284   #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
0285 
0286   // Check if variant is available and usable
0287   #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
0288   #    if defined(__clang__) && (__clang_major__ < 8)
0289          // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
0290          // fix should be in clang 8, workaround in libstdc++ 8.2
0291   #      include <ciso646>
0292   #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
0293   #        define CATCH_CONFIG_NO_CPP17_VARIANT
0294   #      else
0295   #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
0296   #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
0297   #    else
0298   #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
0299   #    endif // defined(__clang__) && (__clang_major__ < 8)
0300   #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
0301 #endif // defined(__has_include)
0302 
0303 
0304 #if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH)
0305 #   define CATCH_CONFIG_WINDOWS_SEH
0306 #endif
0307 // This is set by default, because we assume that unix compilers are posix-signal-compatible by default.
0308 #if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)
0309 #   define CATCH_CONFIG_POSIX_SIGNALS
0310 #endif
0311 
0312 #if defined(CATCH_INTERNAL_CONFIG_GETENV) && !defined(CATCH_INTERNAL_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_GETENV)
0313 #   define CATCH_CONFIG_GETENV
0314 #endif
0315 
0316 #if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING)
0317 #    define CATCH_CONFIG_CPP11_TO_STRING
0318 #endif
0319 
0320 #if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL)
0321 #  define CATCH_CONFIG_CPP17_OPTIONAL
0322 #endif
0323 
0324 #if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW)
0325 #  define CATCH_CONFIG_CPP17_STRING_VIEW
0326 #endif
0327 
0328 #if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT)
0329 #  define CATCH_CONFIG_CPP17_VARIANT
0330 #endif
0331 
0332 #if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)
0333 #  define CATCH_CONFIG_CPP17_BYTE
0334 #endif
0335 
0336 
0337 #if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
0338 #  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE
0339 #endif
0340 
0341 #if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE)
0342 #  define CATCH_CONFIG_NEW_CAPTURE
0343 #endif
0344 
0345 #if !defined( CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED ) && \
0346     !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) &&          \
0347     !defined( CATCH_CONFIG_NO_DISABLE_EXCEPTIONS )
0348 #  define CATCH_CONFIG_DISABLE_EXCEPTIONS
0349 #endif
0350 
0351 #if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN)
0352 #  define CATCH_CONFIG_POLYFILL_ISNAN
0353 #endif
0354 
0355 #if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)
0356 #  define CATCH_CONFIG_USE_ASYNC
0357 #endif
0358 
0359 #if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
0360 #  define CATCH_CONFIG_GLOBAL_NEXTAFTER
0361 #endif
0362 
0363 
0364 // The goal of this macro is to avoid evaluation of the arguments, but
0365 // still have the compiler warn on problems inside...
0366 #if defined( CATCH_INTERNAL_CONFIG_USE_BUILTIN_CONSTANT_P ) && \
0367     !defined( CATCH_INTERNAL_CONFIG_NO_USE_BUILTIN_CONSTANT_P ) && !defined(CATCH_CONFIG_USE_BUILTIN_CONSTANT_P)
0368 #define CATCH_CONFIG_USE_BUILTIN_CONSTANT_P
0369 #endif
0370 
0371 #if defined( CATCH_CONFIG_USE_BUILTIN_CONSTANT_P ) && \
0372     !defined( CATCH_CONFIG_NO_USE_BUILTIN_CONSTANT_P )
0373 #    define CATCH_INTERNAL_IGNORE_BUT_WARN( ... )                                              \
0374         (void)__builtin_constant_p( __VA_ARGS__ ) /* NOLINT(cppcoreguidelines-pro-type-vararg, \
0375                                                      hicpp-vararg) */
0376 #else
0377 #    define CATCH_INTERNAL_IGNORE_BUT_WARN( ... )
0378 #endif
0379 
0380 // Even if we do not think the compiler has that warning, we still have
0381 // to provide a macro that can be used by the code.
0382 #if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION)
0383 #   define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
0384 #endif
0385 #if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION)
0386 #   define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
0387 #endif
0388 #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
0389 #   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
0390 #endif
0391 #if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS)
0392 #   define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
0393 #endif
0394 #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT)
0395 #   define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT
0396 #endif
0397 #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS)
0398 #   define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS
0399 #endif
0400 #if !defined(CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS)
0401 #   define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS
0402 #endif
0403 #if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)
0404 #   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
0405 #endif
0406 #if !defined( CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS )
0407 #    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
0408 #endif
0409 #if !defined( CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS )
0410 #    define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS
0411 #endif
0412 #if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS )
0413 #    define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS
0414 #endif
0415 
0416 #if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)
0417 #   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
0418 #elif defined(__clang__) && (__clang_major__ < 5)
0419 #   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
0420 #endif
0421 
0422 
0423 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
0424 #define CATCH_TRY if ((true))
0425 #define CATCH_CATCH_ALL if ((false))
0426 #define CATCH_CATCH_ANON(type) if ((false))
0427 #else
0428 #define CATCH_TRY try
0429 #define CATCH_CATCH_ALL catch (...)
0430 #define CATCH_CATCH_ANON(type) catch (type)
0431 #endif
0432 
0433 #if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR)
0434 #define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
0435 #endif
0436 
0437 #if defined( CATCH_PLATFORM_WINDOWS ) &&       \
0438     !defined( CATCH_CONFIG_COLOUR_WIN32 ) && \
0439     !defined( CATCH_CONFIG_NO_COLOUR_WIN32 ) && \
0440     !defined( CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 )
0441 #    define CATCH_CONFIG_COLOUR_WIN32
0442 #endif
0443 
0444 #if defined( CATCH_CONFIG_SHARED_LIBRARY ) && defined( _MSC_VER ) && \
0445     !defined( CATCH_CONFIG_STATIC )
0446 #    ifdef Catch2_EXPORTS
0447 #        define CATCH_EXPORT //__declspec( dllexport ) // not needed
0448 #    else
0449 #        define CATCH_EXPORT __declspec( dllimport )
0450 #    endif
0451 #else
0452 #    define CATCH_EXPORT
0453 #endif
0454 
0455 #endif // CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED