From 7da632b43864482fd9767e069e3c0b86bb7a74ad Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 7 Apr 2020 18:49:24 +0200 Subject: [PATCH] Fix building test.cpp with c++17 uncaught_exception() has been replaced with uncaught_exceptions(). --- tests/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test.cpp b/tests/test.cpp index bb4b04564f..851785a72c 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -135,7 +135,11 @@ static void TestAssertHandler(const wxString& file, // so we'd just die without any useful information -- abort instead. abortReason << assertMessage << "in a worker thread."; } +#if __cplusplus >= 201703L || wxCHECK_VISUALC_VERSION(14) + else if ( uncaught_exceptions() ) +#else else if ( uncaught_exception() ) +#endif { // Throwing while already handling an exception would result in // terminate() being called and we wouldn't get any useful information