Boost logo

Boost :

Subject: Re: [boost] [outcome] To variant, or not to variant?
From: Robert Ramey (ramey_at_[hidden])
Date: 2017-06-01 14:23:08

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, 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.

> They differ only by
> interfaces. Two interfaces for two different problems

Right. It's common for different
"types/libraries/concepts/functions/etc." to factor out commonality for
just the reasons mentioned above.

Robert Ramey

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