On Mon, Jul 17, 2017 at 1:38 AM, Niall Douglas via Boost < boost@lists.boost.org> 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
` but returns a `result ` will dump the context, if returning an `outcome ` 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 :)