Boost logo

Boost :

Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2018-01-16 22:20:53


2018-01-16 17:35 GMT+01:00 Andrey Semashev via Boost <boost_at_[hidden]>
:

> On 01/16/18 19:25, Andrzej Krzemienski via Boost wrote:
>
>> 2018-01-16 17:15 GMT+01:00 Andrey Semashev via Boost <
>> boost_at_[hidden]>
>> :
>>
>> On 01/16/18 19:10, Andrzej Krzemienski via Boost wrote:
>>>
>>>>
>>>> This is now getting closer to Boost.outcome, isn't it?
>>>>
>>>
>>> With my limited knowledge of Boost.Outcome, I don't think so. An outcome
>>> is supposed to carry a value or error, and `error_code` carries only the
>>> error code.
>>>
>>
>> Boost.Outcome provides a number of tools. One of types, `result<void>`
>> (maybe error of value, but value is void), is exactly this: a `bool` flag
>> and an `error_code`.
>>
>
> Still, it is a different thing, semantically. If the `bool` is `true`
> (i.e. indicates value), it contains no error code, doesn't it? At least, I
> don't think it should.
>

Yes you are correct. If there are any statuses representing success in
producing a value, they will be discarded.

Interestingly Outcome's `result` has the potential to represent both
successfully computed value and a status code, without any additional
spacial overhead. It was has now been disabled. But I know see how it could
be useful.

Regards,
&rzej;


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