2018-01-16 17:35 GMT+01:00 Andrey Semashev via Boost
On 01/16/18 19:25, Andrzej Krzemienski via Boost wrote:
2018-01-16 17:15 GMT+01:00 Andrey Semashev via Boost < boost@lists.boost.org> :
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;