From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2020-07-05 02:29:41
On Sat, Jul 4, 2020 at 5:58 PM Niall Douglas via Boost <
> On 04/07/2020 23:57, Peter Dimov via Boost wrote:
> > Emil Dotchevski wrote:
> >> When exceptions are disabled, I get:
> >> In file included from ../../../../boost/outcome/result.hpp:34:
> >> In file included from ../../../../boost/outcome/boost_result.hpp:36:
> >> In file included from ../../../../boost/exception_ptr.hpp:9:
> >> In file included from
> >> ../../../../boost/exception/detail/exception_ptr.hpp:17:
> >> ../../../../boost/exception/detail/clone_current_exception.hpp:22:6:
> >> error:
> >> This header requires exception handling to be enabled.
> > Are you reporting a bug to yourself?
> Pretty much +1 from me as well.
> Surely we test Boost with exceptions globally disabled in the regression
> testing right?
What Peter means is that boost::exception_ptr ought to support
BOOST_NO_EXCEPTIONS. However, it does not, it never has.
It is not trivial to support it because its implementation has been
complicated over the years; remember, it was added when there was no
standard support for exception_ptr. And I've learned that I can't remove
old features because there's code in the wild that uses them. I think this
is the complete list of legacy features:
- If there is standard support, it is able to wrap std::exception_ptr in a
- 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.
Not sure what's the best approach here.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk