Subject: Re: [boost] variant2 never empty guarantees (was: Re: Outcome/expected/etc/etc/etc)
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-06-06 13:40:57
2017-06-06 15:38 GMT+02:00 Gottlob Frege via Boost <boost_at_[hidden]>:
> On Tue, Jun 6, 2017 at 5:29 AM, Andrzej Krzemienski via Boost
> <boost_at_[hidden]> wrote:
> > You are basically saying: provide the implementation that gives me strong
> > guarantee when I meet condition X. ("X" being up to one type with
> > potentially throwing move constructor).
> > Your expectation is reasonable, but (I think) it is incompatible with
> > peoples' expectation: provide implementation that gives me never-empty
> > guarantee when I meet condition Y. ("Y" in that case means I have a type
> > with nothrow default constructor.)
> > I do not think both expectations can be satisfied in one implementation.
> > Regards,
> > &rzej;
> Agreed. But I don't see much value in the never-empty guarantee if it
> doesn't give you the strong guarantee.
Exactly. I would like to see an example where a never-empty guarantee alone
adds value. Maybe this is just my lack of imagination.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk