Boost logo

Boost :

Subject: Re: [boost] [review][variant2] Variant2 Review Starts April 1
From: Larry Evans (cppljevans_at_[hidden])
Date: 2019-03-26 18:02:46


On 3/26/19 12:08 PM, Andrzej Krzemienski via Boost wrote:
[snip]
>> As long as there are non-trivial trade-offs for any type/template, there
>> will be reasonable users who would opt for different trade-offs when in
>> different domains. We just have to decide which combinations of the
>> trade-offs are worth collecting into a facility that is present in boost or
>> the standard or elsewhere.
>>
>
> True. And maybe names of different variants of variant should reflect the
> different trade-offs. Maybe noempty::variant rather than
> variant2::variant?
>

What about:

   template<typename... T>
   struct boost::variant2<T...>: std::variant<T...>
   { ... };

?

After all, isn't boost::variant2<T...>
simply more restrictive than std::variant<T...> in that
boost::variant2 has the
the never-valueless requirement
but std::variant does not.


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