|
Boost : |
Subject: Re: [boost] Boost.Outcome review - First questions
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-05-23 14:45:12
2017-05-23 16:03 GMT+02:00 Peter Dimov via Boost <boost_at_[hidden]>:
> Andrzej Krzemienski wrote:
>
> On the other hand, empty state is not something inherited from
>> `option<T>`. It is simply that you need it to have a simple implementation
>> of `result<T>`. What would a default-constructed `result<T>` do?
>>
>
> The usual approach is to default-construct a T, although in the course of
> this review I came to the conclusion that there's a strong argument to be
> made for constructing make_error_code( uninitialized_result ) instead.
>
:) yes, you already have an "empty" state. Even in `std::expected`.
Regards,
&rzej;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk