|
Boost : |
Subject: Re: [boost] [outcome] expected<T&>, result<T&>
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-05-25 20:33:40
Le 25/05/2017 à 19:33, Andrzej Krzemienski via Boost a écrit :
> Niall,
> Are Boost.Outcome monads intended to work with references (at least lvalue
> references)?
>
> <snip>
>
> If I try it with `outcome::expected` I also get these messages, but I also
> get a static assert saying that as per LWG decision T must be default
> constructible.
>
> Vicente, does this mean you cannot use `std::expected` to return references?
>
The proposal doesn't includes it. I have a open point to know if the
committee is interested in. As we don't have yet optional<T&> I believed
that it could be done later on. However variant supports references,
isn't it?
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk