Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2020-07-06 21:24:42


On Mon, Jul 6, 2020 at 7:14 AM Niall Douglas via Boost <
boost_at_[hidden]> wrote:
>
> On 05/07/2020 19:41, Emil Dotchevski via Boost wrote:
>
> > On exception_ptr, my original thinking (more than 15 years ago) was
this:
> > the parts of Boost Exception that could be used to call
> > boost::throw_exception should work under BOOST_NO_EXCEPTIONS, but since
> > exceptions can't be thrown, there's no reason why anyone would want to
hold
> > a pointer to one.
>
> What about make_exception_ptr()?
>
> There is a long story behind that function and whether it ought to work
> with exceptions globally disabled or not. Basically, many years ago, I
> reported to those STL implementations which were still implementing it
> as a throw...catch

You see, rather than fixing STL they should have fixed the damn compiler to
not go full retard when it sees a throw. There is no reason why a throw
followed by a catch should be slow. Fix that and we wouldn't need
herbceptions or whatever. But I digress.

> I propose two paths forward:
>
> 1. Boost.Exception gains an exception_ptr which works fine with
> BOOST_NO_EXCEPTIONS.
>
> 2. Boost.Outcome disables use of boost::exception_ptr when
> BOOST_NO_EXCEPTIONS is enabled.
>
> I'm easy with either choice. But I think the former "nicer".

Not just nicer, it's the correct thing to do.


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