Subject: Re: [boost] [variant] Please vote for behavior
From: Joel de Guzman (djowel_at_[hidden])
Date: 2013-01-29 18:54:13
On 1/30/13 7:23 AM, Larry Evans wrote:
>>> This discussion might be facilitated if Joel et al (sorry Joel, I don't
>>> mean to pick on you, I just mean the group arguing for introducing this
>>> "singular" post-move state) simply said "yes, we understand we're
>>> making a
>>> breaking change (by possibly introducing an additional state to variant
>>> that violates the never-empty guarantee), but we still think it's the
>>> practical approach to introduce efficient move semantics to variant".
>>> I can
>>> jive with that but I think Paul's concerned that you (again, as a
>>> representative of the platform you're taking) don't appreciate that
>>> this is
>>> a breaking change to variant.
>> No, Jeff, that is wrong. We are not violating the semantics to variant.
>> It's not about variant. It's about recursive_wrapper. I think people are
>> confused with this. The variant's never-empty guarantee still holds.
> The page:
> variant may be viewed precisely as a union of exactly its bounded
> but having a singular-valued recursive_wrapper violates this view,
> because there's no way you can dereference a singular-valued
> recursive_wrapper to get at one of the bounded types.
That is actually a good point. I didn't think of it that way, but yeah,
I can appreciate that. So, I think I am inclined to agree with Jeff now.
-- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk