Boost logo

Boost :

Subject: Re: [boost] [outcome v2] Please comment on new result<T, EC> reference API docs
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-06-22 00:50:18

>> What's far more interesting is result<void, void>. Yes expected<void,
>> void> is also legal too. Where things get mind bendy is that v2
>> result<T, E> can return a T with additional info E, so you can quite
>> legitimately have a result<void, void> with both .has_value() and
>> .has_error() returning true.
> Wasn't this one of the issues people took with Noexcept, that since it
> works with any return type whatsoever, there is no clear invariant, and you
> could end up in a situation where you have a value and an error? (I
> actually agree with this criticism, but in my mind this is a small price to
> pay for not burdening return objects with transporting errors as well as
> values.)

The idea, since we no longer have variant storage, is to see if we'd
like to implement
(except with the parameter order reversed).

Now, I am fairly sure that .error() is the wrong way to return a status.
I am minded that a .status() should do that. I just did a major refactor
there as yesterday's code made GCC 6 and VS2017.3 barf. I'm on it.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at