|
Boost : |
Subject: Re: [boost] Noexcept
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-06-29 06:34:52
2017-06-29 8:14 GMT+02:00 Emil Dotchevski via Boost <boost_at_[hidden]>:
> On Wed, Jun 21, 2017 at 12:43 AM, Andrzej Krzemienski via Boost <
> boost_at_[hidden]> wrote:
>
> > > In error-neutral contexts, you simply return throw_() to propagate any
> > > error from lower level functions.
> >
> > But does this not compromise exception neutrality? That you have to
> specify
> > in each function that you want to just pass the exception up?
> >
>
> Compared to what? Is there a better option when you can't throw?
>
My observation is, if you cannot throw then exception neutrality is not
achievable.
Here, by "exception neutrality" I mean what function std::qsort is doing.
It does not mention `try` or `catch` by any means, it can be compiled with
C compiler, and yet it can propagate exceptions thrown by the callback.
Regards,
&rzej;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk