Boost logo

Boost :

Subject: Re: [boost] [variant2] Need rationale for never-empty guarantee
From: Robert Ramey (ramey_at_[hidden])
Date: 2019-03-01 18:17:16

On 3/1/19 10:05 AM, Steven Watanabe via Boost wrote:
> On 3/1/19 9:50 AM, Robert Ramey via Boost wrote:
>> C++ starts from the idea that every instance should be mutable and hence
>> gives you an assignment operator by default.  The design discussions
>> around variant (expected, outcome, ...) presume that this operation must
>> be implemented.  I question this.  Not only for variant, but for many
>> other C++ data types.
> If you want a variant without assignment, it's
> called const variant<>

LOL - of course you're right. But I was wondering if this would inhibit
the inclusion of all of the now unnecessary overhead - double buffering
etc - even it isn't actually used. Then there's a question about the
move operator. In my usage, that seems like a legitimate usage - but
const would inhibit. Offhand I don't know what this means for swap. So I
still have questions.

Robert Ramey

> In Christ,
> Steven Watanabe
> _______________________________________________
> Unsubscribe & other changes:

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