Boost logo

Boost :

Subject: Re: [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 15:42:41


Vicente J. Botet Escriba wrote:
> > enum unscoped_error
> > {
> > unscoped_other_error = 7
> > };
> >
> > expected<double, unscoped_error> test()
> > {
> > return unscoped_other_error; // returns 7.0
> > }

...

> unexpected_type<E> is explicitly constructible from E. expected<T, E> is
> implicitly constructible from unexpected_type<E>. This avoid this kind of
> ambiguities.

Could you please try this code with your implementation?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk