Boost logo

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.


ned Productions Limited Consulting

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