forked from boostorg/exception
Use enable_current_exception instead of wrapexcept in copy_exception
This commit is contained in:
@ -112,14 +112,24 @@ boost
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace
|
||||||
|
exception_detail
|
||||||
|
{
|
||||||
|
template <class E>
|
||||||
|
inline
|
||||||
|
exception_ptr
|
||||||
|
copy_exception_impl( E const & e )
|
||||||
|
{
|
||||||
|
return exception_ptr(boost::make_shared<E>(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <class E>
|
template <class E>
|
||||||
inline
|
inline
|
||||||
exception_ptr
|
exception_ptr
|
||||||
copy_exception( E const & e )
|
copy_exception( E const & e )
|
||||||
{
|
{
|
||||||
E cp = e;
|
return exception_detail::copy_exception_impl(boost::enable_current_exception(e));
|
||||||
exception_detail::copy_boost_exception(&cp, &e);
|
|
||||||
return exception_ptr(boost::make_shared<wrapexcept<E> >(cp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
Reference in New Issue
Block a user