Subject: Re: [boost] [variant2] Review of Variant2 started today : April 1 - April 10
From: Robert Ramey (ramey_at_[hidden])
Date: 2019-04-02 14:39:40
On 4/2/19 6:43 AM, Peter Dimov via Boost wrote:
>> Andrey Semashev wrote:
>> > Also, IMHO, it's better to have libraries more focused and fine
>> grained. > Why not have `expected` as a separate library?
>> expected<T, E...> is basically a variant, with a slightly different
> To expand on that a bit... to implement expected<T, E...> you need an
> underlying variant. You can either implement your own ad-hoc one, which
> is a duplication of work; or you could use an existing variant, but then
> you inherit its properties and have to reflect those in the
> specification of `expected`. For instance, if the variant can be
> valueless, you need to figure out what to do in `expected` when it gets
> into that state.
> For those reasons, it makes most sense to develop `variant` and
> `expected` in parallel, as parts of the same library.
I'm thinking more of variant. Then expected, etc become "use cases"
rather than first class library types.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk