Fix CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTION interaction with feature macro

This commit is contained in:
Martin Hořeňovský
2020-05-01 20:26:40 +02:00
parent 89fab65382
commit bbbc7a0d7f
3 changed files with 3 additions and 15 deletions
@@ -12,7 +12,7 @@
namespace Catch {
bool uncaught_exceptions() {
#if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
#if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) || (defined(__cpp_lib_uncaught_exceptions) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS))
return std::uncaught_exceptions() > 0;
#else
return std::uncaught_exception();