From 6fbe5efc717a72c9749c5590c96524e92cddeca6 Mon Sep 17 00:00:00 2001 From: John Else Date: Mon, 13 Apr 2020 16:10:36 +0100 Subject: [PATCH] Use macro to determine whether std::uncaught_exceptions is available Catch assumes std::uncaught_exceptions is available whenever C++17 is available, but for macOS versions older than 10.12 this is not the case. Instead of checking the C++ version, use a macro to check whether the feature is available. --- include/internal/catch_compiler_capabilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index 8d8b3c50..26351c7a 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -39,7 +39,7 @@ #endif -#if defined(CATCH_CPP17_OR_GREATER) +#if defined(__cpp_lib_uncaught_exceptions) # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS #endif