Boost logo

Boost :

Subject: Re: [boost] [outcome] To variant, or not to variant?
From: Daniela Engert (dani_at_[hidden])
Date: 2017-05-31 10:59:04


Am 31.05.2017 um 10:26 schrieb Gavin Lambert via Boost:
>
> template<typename T>
> class outcome
> {
> ...
> private:
> variant<none_t, T, error_code, exception_ptr> m_storage;
> };

This is pretty much what I expect from an 'outcome' vocabulary type. In
my mental model, a 'none_t' would cover the 'partially formed' nascent
and/or forgot-to-produce-an-outcome state which is never looked at
besides contract checking. The failure to produce a T (i.e. violation of
postcondition) is reflected in error_code or exception_ptr.

Ciao
   Dani

-- 
PGP/GPG: 2CCB 3ECB 0954 5CD3 B0DB 6AA0 BA03 56A1 2C4638C5

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk