Disable the use of std::exception_ptr for MSVC 2010.

While <exception> 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
This commit is contained in:
Vadim Zeitlin 2014-08-25 18:29:31 +00:00
parent 2a0b758973
commit 2c100e498b

View File

@ -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