On 22/06/2017 00:21, Peter Dimov via Boost wrote:
https://dedi4.nedprod.com/static/result-v2/doc_result.html
Niall, what does result represent?
Same as expected.
It's legal to return that failure occurred, but no information as to
why. I see that as being possibly useful.
What's far more interesting is result. Yes expected is also legal too. Where things get mind bendy is that v2
result can return a T with additional info E, so you can quite
legitimately have a result with both .has_value() and
.has_error() returning true.
I agree before you say it that that is daft. But I see no good reason to
not support it other than "that is daft". And besides, outcome looks much more useful, and that would have a
result internally, so there is a real actual use case for
result.
Niall
--
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/