|
Boost : |
Subject: Re: [boost] Outcome v2
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-07-13 00:29:35
On 13/07/2017 11:48, Emil Dotchevski wrote:
>> then you have no choice but to do an error domain conversion.
>
> In case of Outcome, yes.
>
> In case of Noexcept, no, it has been designed to be able to propagate the
> original error object.
That worries me a bit where code is using a generic type such as int for
error codes but don't have the same meanings for the values. It would
be very easy to accidentally let one slip through without conversion so
that it ends up representing the wrong error.
Granted, Outcome doesn't help much with that issue either, unless you
wrap them in a std::error_code. (For Noexcept, the equivalent would be
to always convert to a typed enum at the earliest opportunity and never
allow a plain int to propagate.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk