diff --git a/include/boost/exception/detail/exception_ptr.hpp b/include/boost/exception/detail/exception_ptr.hpp index e98b98b..b204e93 100644 --- a/include/boost/exception/detail/exception_ptr.hpp +++ b/include/boost/exception/detail/exception_ptr.hpp @@ -30,8 +30,23 @@ boost { typedef shared_ptr exception_ptr; + exception_ptr current_exception(); + template - exception_ptr copy_exception( T const & ); + inline + exception_ptr + copy_exception( T const & e ) + { + try + { + throw enable_current_exception(e); + } + catch( + ... ) + { + return current_exception(); + } + } #ifndef BOOST_NO_RTTI typedef error_info original_exception_type; @@ -363,22 +378,6 @@ boost return ret; } - template - inline - exception_ptr - copy_exception( T const & e ) - { - try - { - throw enable_current_exception(e); - } - catch( - ... ) - { - return current_exception(); - } - } - inline void rethrow_exception( exception_ptr const & p )