From c98deb1e40e0beb6ee4b6d08a8b98060d6687d40 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 7 Sep 2010 21:46:10 +0000 Subject: [PATCH] properly ifdeffing the X86 MSVC non-intrusive exception_ptr support [SVN r65346] --- .../exception/detail/clone_current_exception.hpp | 11 +++++------ src/clone_current_exception_msvc.cpp | 6 +++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/boost/exception/detail/clone_current_exception.hpp b/include/boost/exception/detail/clone_current_exception.hpp index 06355c8..28e3377 100644 --- a/include/boost/exception/detail/clone_current_exception.hpp +++ b/include/boost/exception/detail/clone_current_exception.hpp @@ -26,18 +26,17 @@ boost } class clone_base; - int clone_current_exception_msvc( clone_base const * & cloned ); + int clone_current_exception_msvc_x86( clone_base const * & cloned ); inline int clone_current_exception( clone_base const * & cloned ) { -#ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR -#ifdef _MSC_VER - return clone_current_exception_msvc(cloned); -#endif -#endif +#if defined(BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR) && defined(_MSC_VER) && defined(_M_IX86) && !defined(_M_X64) + return clone_current_exception_msvc_x86(cloned); +#else return clone_current_exception_result::not_supported; +#endif } } } diff --git a/src/clone_current_exception_msvc.cpp b/src/clone_current_exception_msvc.cpp index 73914bc..ad279c4 100644 --- a/src/clone_current_exception_msvc.cpp +++ b/src/clone_current_exception_msvc.cpp @@ -10,6 +10,8 @@ #error This file requires exception handling to be enabled. #endif +#if defined(_MSC_VER) && defined(_M_IX86) && !defined(_M_X64) + #include #include #include @@ -266,7 +268,7 @@ boost exception_detail { int - clone_current_exception_msvc( clone_base const * & cloned ) + clone_current_exception_msvc_x86( clone_base const * & cloned ) { BOOST_ASSERT(!cloned); int result = clone_current_exception_result::not_supported; @@ -288,3 +290,5 @@ boost } } } + +#endif