std::variant doesn't support references either (that was a late decision, IIRC)
I'm not sure it or optional ever will. Although maybe expected
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
I believed that it could be done later on. However variant supports references, isn't it? Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost