Add wxCHECK_CXX_STD() and use it to test for C++17 and C++20
Unlike direct tests of __cplusplus, using this macro also works with (recent enough, i.e. MSVS 2015.3 or later) MSVC versions, even if /Zc:__cplusplus is not used. This simplifies some checks and makes some other ones (notably the check for C++20 used before wxALLOW_COMBINING_ENUMS macro definition) work with MSVC versions with C++20 support as intended.
This commit is contained in:
@@ -133,7 +133,7 @@ static void TestAssertHandler(const wxString& file,
|
||||
// so we'd just die without any useful information -- abort instead.
|
||||
abortReason << assertMessage << wxASCII_STR(" in a worker thread.");
|
||||
}
|
||||
#if __cplusplus >= 201703L || wxCHECK_VISUALC_VERSION(14)
|
||||
#if wxCHECK_CXX_STD(201703L)
|
||||
else if ( uncaught_exceptions() )
|
||||
#else
|
||||
else if ( uncaught_exception() )
|
||||
|
||||
Reference in New Issue
Block a user