From c364032d4c9e025704cf7caf379e8880ad87a59a Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 23 Jan 2023 14:26:30 +0100 Subject: [PATCH] Disable uncaught_exception support for C++ 20 and later (PR #1187) `std::uncaught_exception` was removed from C++ 20. --- config_cxx.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config_cxx.h b/config_cxx.h index 95093de76..16b419478 100644 --- a/config_cxx.h +++ b/config_cxx.h @@ -39,7 +39,10 @@ // You may need to force include a C++ header on Android when using STLPort // to ensure _STLPORT_VERSION is defined -#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT))) +#if (defined(_MSC_VER) && _MSC_VER <= 1300) || \ + defined(__MWERKS__) || \ + (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)) || \ + (__cplusplus >= 202002L)) #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION #endif