Boost logo

Boost :

Subject: Re: [boost] [outcome v2] Please comment on new result<T, EC> reference API docs
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-22 01:08:14


Niall Douglas wrote:
> The idea, since we no longer have variant storage, is to see if we'd like
> to implement
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0262r0.html
> (except with the parameter order reversed).

I'm not particularly enthusiastic about status_value (and the argument given
in the paper is unconvincing.) Neither am I thrilled by the idea of
result<R, void> (an optional) or result<void, void> (something like a
glorified pair<bool, bool>.)

result<T, EC> in its original form represented a very clear concept: the
type of a function that must either return a value, or a reason for the lack
of value. All of the above do not fit this concept and to me ring hollow.

The fact that for outcome<T, EC, exception_ptr> we may want to have both an
EC and an exception_ptr does not necessarily mean that we need to give up on
the Either( Value, Reason ). In outcome's case, the reason is just more
elaborate.


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