// Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2008 Sebastian Redl #ifndef EXCEPTION_PTR_HPP #define EXCEPTION_PTR_HPP #include #include // Based on the ABI of GCC 4.2.2. No compatibility guaranteed with anything // else. namespace boost { namespace detail { struct eh_info { void *d1; void *d2; void *d3; void *d4; eh_info *next; int handlerCount; // This assumes __ARM_EABI_UNWINDER__ unset. int d6; void *d7; void *d8; void *d9; void *d10; _Unwind_Exception unwindHeader; }; void intrusive_ptr_add_ref(eh_info *p); void intrusive_ptr_release(eh_info *p); } typedef boost::intrusive_ptr exception_ptr; exception_ptr current_exception(); void rethrow_exception(exception_ptr p); template exception_ptr copy_exception(E e) { try { throw e; } catch( ... ) { return current_exception(); } } } #endif