Subject: Re: [boost] [outcome] Review of Outcome
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-05-29 21:04:46
Le 29/05/2017 Ã 17:43, Niall Douglas via Boost a Ã©crit :
>>> 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
>> Why do you need atomics?
> It's not my code. It's std::exception_ptr. It uses atomics.
Sorry I misunderstood what you said.
>>> 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.
Emil, I don't remember, would empty be a success case or a failure case?
Is this important?