Subject: Re: [boost] Noexcept
From: Bjorn Reese (breese_at_[hidden])
Date: 2017-06-13 20:01:39
On 06/13/2017 12:38 AM, Emil Dotchevski via Boost wrote:
> I'll spell it out: Noexcept + optional<> â Outcome
That approximation only holds for function-calling scenarios. As I
pointed out in my review, there are other use cases for Outcome.
Noexcept is a bad match for these use cases, because it transports
errors "out-of-band" like errno.
One use case is to pass a value-or-error between threads. We already
have one outcome-like feature for this: promise-future. If we want to
use a different mechanism to pass the value-or-error between threads,
then Outcome offers a natural solution.
Another use case is to pass a value-or-error via a queue. The queue
may contain several outstanding errors. In the case of Outcome, we
simply push the value-or-error directly to the queue.