Boost logo

Boost :

Subject: Re: [boost] [review] Review of Outcome v2 (Fri-19-Jan to Sun-28-Jan, 2018)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-02-01 01:28:34

On 02/01/18 04:06, Vinícius dos Santos Oliveira wrote:
> 2018-01-31 21:02 GMT-03:00 Andrey Semashev via Boost
> <boost_at_[hidden] <mailto:boost_at_[hidden]>>:
> It's not the exceptions that made variant difficult. It's *the
> possibility of a failure* at certain points in some cases. You would
> have the same difficulty defining behavior in these cases with any
> error reporting mechanism, exceptions or not.
> The way the language features interact makes this hard.

Nope. Nothing about exceptions themselves makes variant hard. And the
solution existed in Boost long before std::variant and Rust. It's that
not everyone was happy with it and the other side was not happy with the

> It'd be much simpler if move constructors were forbidden to throw (I'm
> **not** saying this would be a good rule to have in the language).

Right, but as long as you allow move constructor/assignment to fail, you
will have to define behavior when the failure happens. *That* is the
difficult part, not handling exceptions or error codes or whatever.

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