|
Boost : |
Subject: Re: [boost] [outcome] To variant, or not to variant?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-06-01 17:24:08
Le 01/06/2017 à 16:23, Robert Ramey via Boost a écrit :
> On 6/1/17 12:22 AM, Andrzej Krzemienski via Boost wrote:
>> A valid observation. In a way `expected` and `outcome` (both from
>> Boost.Outcome) have different goals in mind. `expected` might in fact
>> cover
>> your case. They could be two libraries. The reason they come together is
>> that they share 95% of the same implementation.
>
> I haven't investigated too deeply into the code so of course I didn't
> know that. I would have "expected" that outcome, expected, et.al
> would be derived from variant which would be the shared code. Also
> all the questions about narrow/wide interface, no empty guarantees,
> etc. would be resolved (for better or worse) in the variant library so
> the design, review, maintenance, etc. of outcome, expected et al.
> would be confined to the particular aspects of these components - thus
> being a more economic application of limited brain surface area. Code
> size would be smaller as well.
The problem is that we don't have a never-empty variant in Boost (we
have Boost.Variant, but it uses double buffer IIRC).
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk