Boost logo

Boost :

Subject: Re: [boost] [variant2] Andrzej's review
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2019-04-13 20:04:29

On Sat, Apr 13, 2019 at 8:57 AM Niall Douglas via Boost <
boost_at_[hidden]> wrote:
> On 13/04/2019 16:33, Peter Dimov via Boost wrote:
> > Niall Douglas wrote:
> >
> >> I just do not understand the antipathy here to a
> >> double-buffered-by-default design, and thus the strong guarantee can
> >> be easily made, rather than a worse-than-useless basic guarantee which
> >> is only technically valid, but is certainly surprising.
> >
> > First off, the basic guarantee isn't worse than useless, it's the
> > minimum standard that every non-broken component must meet, and everyone
> > who argues otherwise isn't worth listening to.
> Sorry, that's the wrong bunching of my words (my fault).
> What I specifically meant was "worse-than-useless choice of
> implementation by variant2 of the basic guarantee which is only
> technically valid, but is certainly surprising".

I'll repeat myself, I fail to see any logic in this statement that doesn't
apply to std::vector::op=.

Yes, with variant2 the contained type may change, whereas the type of the
objects in the vector won't change, but this is irrelevant. It's like
saying well, at least variant won't change its size, whereas a vector
could, and that is "technically valid but is certainly surprising".

Yes indeed, when an error occurs, you might find objects in a state that
you didn't set explicitly. Being surprised that the state may change is
equivalent to not understanding how error handling works under the basic

Boost list run by bdawes at, gregod at, cpdaniel at, john at