From 2c100e498bd629e3a7a45885be3e7c1d1189e02b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Aug 2014 18:29:31 +0000 Subject: [PATCH] Disable the use of std::exception_ptr for MSVC 2010. While does define this type in this version of the compiler, it's non-conforming and doesn't define conversion to bool, so we can't test whether it is valid or not. We could work around it but for now just disable the use of exception_ptr with VC10 and only use it for VC11+. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appbase.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 58fe2b2e3e..7b94879e58 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -52,9 +52,12 @@ #if __cplusplus >= 201103L // Any conforming C++11 compiler should have it. #define HAS_EXCEPTION_PTR - #elif wxCHECK_VISUALC_VERSION(10) + #elif wxCHECK_VISUALC_VERSION(11) // VC++ supports it since version 10, even though it doesn't define - // __cplusplus to C++11 value. + // __cplusplus to C++11 value, but MSVC 2010 doesn't have a way to test + // whether exception_ptr is valid, so we'd need to use a separate bool + // flag for it if we wanted to make it work. For now just settle for + // only using exception_ptr for VC11 and later. #define HAS_EXCEPTION_PTR #endif