1 //Copyright (c) 2006-2013 Emil Dotchevski and Reverge Studios, Inc. 2 3 //Distributed under the Boost Software License, Version 1.0. (See accompanying 4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #ifndef BOOST_EXCEPTION_81522C0EB56511DFAB613DB0DFD72085 7 #define BOOST_EXCEPTION_81522C0EB56511DFAB613DB0DFD72085 8 9 #ifndef BOOST_EXCEPTION_ENABLE_WARNINGS 10 #if __GNUC__*100+__GNUC_MINOR__>301 11 #pragma GCC system_header 12 #endif 13 #ifdef __clang__ 14 #pragma clang system_header 15 #endif 16 #ifdef _MSC_VER 17 #pragma warning(push,1) 18 #endif 19 #endif 20 21 #ifdef BOOST_NO_EXCEPTIONS 22 # error This header requires exception handling to be enabled. 23 #endif 24 25 namespace 26 boost 27 { 28 namespace 29 exception_detail 30 { 31 class clone_base; 32 33 #ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR 34 int clone_current_exception_non_intrusive( clone_base const * & cloned ); 35 #endif 36 37 namespace 38 clone_current_exception_result 39 { 40 int const success=0; 41 int const bad_alloc=1; 42 int const bad_exception=2; 43 int const not_supported=3; 44 } 45 46 inline 47 int clone_current_exception(clone_base const * & cloned)48 clone_current_exception( clone_base const * & cloned ) 49 { 50 #ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR 51 return clone_current_exception_non_intrusive(cloned); 52 #else 53 return clone_current_exception_result::not_supported; 54 #endif 55 } 56 } 57 } 58 59 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) 60 #pragma warning(pop) 61 #endif 62 #endif 63