Boost logo

Boost :

Subject: Re: [boost] Final lightweight monad, next gen futures and upcoming AFIO review
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2015-06-28 22:05:24


On 6/28/2015 5:02 PM, Vinícius dos Santos Oliveira wrote:
> 2015-06-28 17:52 GMT-03:00 Vinícius dos Santos Oliveira <
> vini.ipsmaker_at_[hidden]>:
>
>> 2015-06-28 17:52 GMT-03:00 Niall Douglas <s_sourceforge_at_[hidden]>:
>>
>>> monad<T>, result<T> and option<T> are all *synchronous* value
>>> transports. Just like Rust's Result and Option.
>>>
>>
>> So, why can result<t> be empty?
>>
>
> I mean: result<T, E> is like "give me T or it's an error". There is no
> empty state. Empty would already be an error state. I'd only understand
> empty if it's an async operation that didn't finish already.
>
>

What's the state of a default constructed result<T, E>?

Is it an error state?
Is it empty?
Or is it not default constructible?


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