Boost logo

Boost :

Subject: Re: [boost] Outcome v2
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2017-07-17 20:52:07

On Mon, Jul 17, 2017 at 1:38 AM, Niall Douglas via Boost <
boost_at_[hidden]> wrote:

> However, `afio_error_code_ref` is non-copyable and non-moveable to
> prevent it outliving the object it refers to, so anything consuming a
> `result<T, afio_error_code_ref>` but returns a `result<T,
> std::error_code>` will dump the context, if returning an `outcome<T,
> std::error_code, afio_error_code>` it'll do the copy construction then,
> if an exception is thrown from it then the exception is constructed with
> the payload embedded and so on.

It's better to use refcounting for the contextual data, like Boost
Exception does. This is because the context is independent from the error
object itself.

> Outcome v2 says nothing about any of this stuff. Up to the end user to
> customize. As I've mentioned before, you could use TLS to store the
> extra context too. Up to the end user.

The fact that programmers can use TLS for anything they want is not a
feature of Outcome :)

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