Since wrapexcept is an undocumented implementation detail of throw_exception, it's better to not use it here. As enable_current_exception on throw is no longer necessary under C++11 as boost::exception_ptr automatically uses std::exception_ptr when present (https://godbolt.org/z/GPK99jTzY), it's possible to remove this functionality from wrapexcept under C++11 to reduce the codegen footprint of using boost::throw_exception, and this PR makes sure that copy_exception will not be broken by such a future change to wrapexcept.
Since
wrapexcept
is an undocumented implementation detail ofthrow_exception
, it's better to not use it here. Asenable_current_exception
onthrow
is no longer necessary under C++11 asboost::exception_ptr
automatically usesstd::exception_ptr
when present (https://godbolt.org/z/GPK99jTzY), it's possible to remove this functionality fromwrapexcept
under C++11 to reduce the codegen footprint of usingboost::throw_exception
, and this PR makes sure thatcopy_exception
will not be broken by such a future change towrapexcept
.