Boost logo

Boost :

Subject: Re: [boost] [variant2] Review of Variant2
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2019-04-16 22:06:37


On 4/14/19 10:05 AM, Peter Dimov via Boost wrote:
> Andrey Semashev wrote:
>> Beside these mandatory requests, I'd be very interested if Peter
>> presented an updated variant proposal, which doesn't create values out
>> of thin air except if it's monostate.
> Since mostly everyone has objected to it - Bjorn has it as an acceptance
> condition - I'll remove the "default construct a suitable alternative"
> fallback.
> I'm not yet sure about the monostate special case, as it becomes even
> more special now. I tend towards removing that too, and just offering
> the strong guarantee.

What about this: Only consider default constructing the
first type, not any type in the list. This should be
much less surprising, because it creates the same state
as a default-constructed variant.

In Christ,
Steven Watanabe

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