forked from boostorg/throw_exception
Add/use exception_detail::enable_both
This commit is contained in:
@ -472,6 +472,18 @@ boost
|
||||
{
|
||||
return exception_detail::clone_impl<T>(x);
|
||||
}
|
||||
|
||||
namespace
|
||||
exception_detail
|
||||
{
|
||||
template <class T>
|
||||
inline
|
||||
clone_impl<typename enable_error_info_return_type<T>::type>
|
||||
enable_both( T const & x )
|
||||
{
|
||||
return enable_current_exception( enable_error_info( x ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
|
@ -67,7 +67,7 @@ template<class E> BOOST_NORETURN inline void throw_exception( E const & e )
|
||||
throw_exception_assert_compatibility(e);
|
||||
|
||||
#ifndef BOOST_EXCEPTION_DISABLE
|
||||
throw enable_current_exception(enable_error_info(e));
|
||||
throw exception_detail::enable_both( e );
|
||||
#else
|
||||
throw e;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user