Subject: Re: [boost] [variant2] Need rationale for never-empty guarantee
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2019-03-02 06:22:12
sob., 2 mar 2019 o 06:04 Emil Dotchevski via Boost <boost_at_[hidden]>
> On Fri, Mar 1, 2019 at 8:55 PM Andrzej Krzemienski via Boost <
> boost_at_[hidden]> wrote:
> > 2. this state is actually read instead of being destroyed (or
> Why does it have to be read instead of destroyed?
Because it is only when you try to read the state of such object, being
observably valueless or not makes any difference.
The reason why
> valid-but-unspecified is useful is not because reading it is somehow
> desirable, but because it could happen. It's better than seeing pink
My hypothesis is that reading valid-but-unspecified can only happen in a
buggy program in an unintended path. And that making design compromises to
address this path is not necessarily the best approach to take.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk