|
Boost : |
Subject: Re: [boost] [variant2] Review of Variant2 started today : April 1 - April 10
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2019-04-02 16:33:19
wt., 2 kwi 2019 o 16:44 Peter Dimov via Boost <boost_at_[hidden]>
napisaÅ(a):
> 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
> > > interface.
> >
> > It might be implemented like/with variant, but conceptually this is a
> > different component. Just like `optional` is a different component than
> > `variant`. All these components have different use cases and communicate
> > different intentions.
>
> It is a different component. That wasn't the question though. The question
> was, why not have it as a separate library. And the answer is, because the
> two components share too much of an implementation, and because the design
> decisions made about one component affect the other (and vice versa - the
> converting constructor and the subset() member function of `variant` are
> needed by `expected`).
>
This sounds a bit like variant2 is just a byproduct from the
implementation of `expected`.
Regards,
&rzej;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk