Boost logo

Boost :

Subject: [boost] expected<T, E...> (Was: [outcome] High level summary of review feedback accepted so far)
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-04 12:40:32

Vicente J. Botet Escriba wrote:

> * remap_errors seems close to what I've called adapt

`adapt` is a good name. I may adopt it. (Or adapt to it.)

There is one open question. With the given interface, with conversions from
T implicit and conversions from an error explicit, consider what happens

    enum unscoped_error
        unscoped_other_error = 7

    expected<double, unscoped_error> test()
        return unscoped_other_error; // returns 7.0

This seems undesirable. To prevent it, we either need to have both explicit,
or both implicit. I'm tending toward the latter (but if an error type is
chosen by the variant-like overload resolution, I plan to static_assert on
exact match.)

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