Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_uncaught_exceptions.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-05-01 20:26:40 +0200
committerMartin Hořeňovský2020-05-01 20:26:40 +0200
commitbbbc7a0d7fdc301d5f9f917426d62827927ca916 (patch)
tree2827db533a50da7fe39ccde3ec8c15b988f590f0 /src/catch2/internal/catch_uncaught_exceptions.cpp
parent89fab653824c4904867bc2e5e5ead7d3bbdeea37 (diff)
downloadcatch3-bbbc7a0d7fdc301d5f9f917426d62827927ca916.tar.gz
Fix CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTION interaction with feature macro
Diffstat (limited to 'src/catch2/internal/catch_uncaught_exceptions.cpp')
-rw-r--r--src/catch2/internal/catch_uncaught_exceptions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_uncaught_exceptions.cpp b/src/catch2/internal/catch_uncaught_exceptions.cpp
index 3c699fb0..1aa863ad 100644
--- a/src/catch2/internal/catch_uncaught_exceptions.cpp
+++ b/src/catch2/internal/catch_uncaught_exceptions.cpp
@@ -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();