Boost logo

Boost :

Subject: Re: [boost] [review] **NEXT WEEK** Review of Outcome (starts Fri-19-May)
From: Peter Dimov (lists_at_[hidden])
Date: 2017-05-14 21:21:24


Niall Douglas wrote:

> outcome<T>, result<T> and option<T> all have formal empty states as part
> of their programming model. They are quite useful for a multitude of uses,
> I mainly have used them to early out from a sequence of monadic operations
> or to signal an abort from a noexcept function.

Would you mind going into more detail with respect to the use cases?

What does returning an empty result mean to the caller, conceptually? The
idea of these result types is to return either a value or a reason for the
lack of value, and an empty state is lacking both the value and the
explanation for why the value is missing.


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