|
Boost : |
Subject: Re: [boost] expected/result/etc
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2016-01-26 21:19:36
On 1/26/2016 4:03 AM, Niall Douglas wrote:
> On 26 Jan 2016 at 0:16, Michael Marcin wrote:
>
>> Some months ago there was a lot of discussion regarding Rust style
>> return values for non-exceptional error handling.
>
> Mine was one of many discussed. Its current name is Outcome.
I like the name.
> If I do say so myself, it is *spectacularly* well suited to this use
> case, producing seriously high quality assembler output. I am very,
> very pleased with it.
Thanks, that is very important to me.
>> Is there a useable library?
>
> https://github.com/ned14/boost.outcome
>
> It requires VS2015 Update 1 or newer, or any C++ 14 compiler.
Again thanks.
I'm using vs2015 update 1 so that works for me.
I'll give it a try.
>
> Two big items remain todo for Outcome:
>
> 1. I want to write a clang-tidy extension which rewrites any outcome
> returning function to be noexcept unless commented otherwise. This
> prevents one forgetting to add noexcept.
>
> 2. I want another clang-tidy extension to mark up outcome returning
> functions with the compiler-specific markup to complain if you forget
> to do something with the returned value. Right now outcomes have the
> same problem as C error returns, one can forget to handle them
> altogether.
Neither of these sound important to me, but to each his own.
> I also strongly emphasise that nothing in Outcome is fixed, things
> may yet change. Outcome is not in the Boost review queue, nor may
> never be.
Fair enough.
Would you like feedback on it if I use it anyways?
Thanks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk