Boost logo

Boost :

Subject: Re: [boost] [outcome] How to drop the formal empty state
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-05-24 23:06:30


> Let me just clarify the nomenclature here. I understand that the only thing
> you *need* to have is the *moved-form* state. There is no strong need to
> provide a default constructor. Sure if you have a moved-from state, you
> might as well use it in default constructor, but it is not the only option.
> You could allow the moved-from state only as the result of a move.

You don't need a moved-from state. If expected<T, E> is moved from and
it had state T, it retains a state T, the value is whatever type T's
move constructor left it in.

No need to be complex when simple will do.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

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