|
Boost : |
Subject: Re: [boost] [outcome] Review of Outcome
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-05-29 15:43:38
>> As was covered in the FAQ, outcome<T> may store an exception_ptr, which
>> is implemented using atomics. This causes the compiler to emit a lot
>> more code than a result<T>, which is why we have a result<T> with
>> implicit conversion on demand to an outcome<T>. If one uses the least
>> representative type possible, one gets minimum code bloat and maximum
>> performance.
>
> Why do you need atomics?
It's not my code. It's std::exception_ptr. It uses atomics.
>> If you favour using the type system to statically enforce error codes,
>> then expected<T, E> is exactly the right object for you.
>
> It seams Emil has a use case for empty or T or exception_ptr :(
That's an interesting combo. I'll support it after replacing the
preprocessor stamped out varieties with template stamped out varieties,
the only reason I didn't have it already was due to saving on
preprocessor work.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk