Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2019-07-03 19:40:19

On 7/3/19 7:42 PM, Robert Ramey via Boost wrote:
> The policy based design is an implement technique to specify the set of
> legitimate variations of a design which the user might need without the
> need to write multiple types.  Right now we have:
> boost::variant
> std::variant
> boost::variant2
> boost::outcome
> ?::expected
> boost::optional
> std::optional
> ... ?
> Each one of these is a hodgepodge of design decisions arrived at after
> very, very, very long speculative discussion.  That are really all just
> special cases of the the concept of "typesafe variant".

We've already had this discussion, and I'll reiterate that these types
are not merely special cases - they serve their specific purposes and
have interfaces and behavior tailored for their respective uses.

You could just as well say that every C++ type is a special case of a
typesafe variant - with only one alternative. This is as true as it is

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