--- enable_current_exception.hpp.orig 2008-09-22 11:55:05.000000000 +0200 +++ enable_current_exception.hpp 2008-09-22 11:59:24.000000000 +0200 @@ -50,7 +50,8 @@ }; template - clone_base * make_clone( T const & ); + class + exception_clone; template class @@ -74,7 +75,22 @@ clone_base const * clone() const { - return make_clone(*this); + try + { + return new exception_clone(*this); + } + catch( + std::bad_alloc & ) + { + static bad_alloc_impl bad_alloc; + return &bad_alloc; + } + catch( + ... ) + { + BOOST_ASSERT(0); + return 0; + } } }; @@ -120,28 +136,6 @@ } }; - template - inline - clone_base * - make_clone( T const & x ) - { - try - { - return new exception_clone(x); - } - catch( - std::bad_alloc & ) - { - static bad_alloc_impl bad_alloc; - return &bad_alloc; - } - catch( - ... ) - { - BOOST_ASSERT(0); - return 0; - } - } } template