Boost logo

Boost :

Subject: Re: [boost] Strong guarantee variant (Was: Outcome/expected/etc/etc/etc)
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-06 11:14:55


Niall Douglas wrote:
> > I wonder whether the people who insist on the strong guarantee on
> > assignment realize that when the variant holds a vector, and you assign
> > it a vector, assignment delegates to vector<>::operator= and as a result
> > you get the basic guarantee because that's what all standard types
> > provide.
>
> I'd expect nothing else. No state change means you always pass through to
> operator=().

I don't understand of what value is a guarantee that is strong when you
change type, but basic if you don't, but perhaps I'm missing something here.


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