Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2020-07-05 03:56:48


Emil Dotchevski wrote:

> - If there is standard support, it is able to wrap std::exception_ptr in a
> boost::exception_ptr.
> - Otherwise, If the exception is a boost::exception, works correctly.
> - Otherwise, under old MSVC versions, it is able to talk to the ABI and
> clone the exception object correctly anyway.
> - Otherwise, it attempts a list of exception types as a fallback.

boost::current_exception() just returns {} when exceptions are disabled, so
all this disappears. Only boost::copy_exception needs to be reimplemented to
not rely on throw+current_exception. I'm not sure why it needs to do so even
when exceptions are enabled though; the complete type is available at this
point.

Incidentally, the C++11 standard name for copy_exception is
make_exception_ptr, but we never fixed it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk