Boost logo

Boost :

Subject: Re: [boost] [outcome] Change semantics on UB from peer review agreed semantics?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2018-09-14 17:03:08


On Fri, Sep 14, 2018 at 12:06 AM Alexander Grund via Boost <
boost_at_[hidden]> wrote:

> > And my other question was, are we sure that anyone is using Outcome for
> > this use case. If the answer approaches "no", that is, if nearly all
> users
> > of Outcome use it only to design exception-free interfaces, it might be
> > better to provide this functionality in a different library.
> Isn't that what optional is for? If you don't want value-or-error
> semantics but rather maybe-value semantics, then that's optional<>.
>

No, because optional would just throw std::bad_optional_access, whereas in
this case you still want the exception to indicate what went wrong with the
operation which was attempted.


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