Boost logo

Boost :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-10-11 15:47:22


On 10/10/2019 23:51, Gavin Lambert via Boost wrote:
> On 11/10/2019 02:25, Niall Douglas wrote:
>> - Support for C++ Coroutines has been added. This comes in two parts,
>> firstly there is now an `OUTCOME_CO_TRY()` operation suitable for
>> performing the `TRY` operation from within a C++ Coroutine. Secondly, in
>> the header `outcome/coroutine_support.hpp` there are implementations of
>> `eager<OutcomeType>` and `lazy<OutcomeType>` which let you more
>> naturally and efficiently use `basic_result` or `basic_outcome` from
>> within C++ Coroutines -- specifically, if the result or outcome will
>> construct from an exception pointer, exceptions thrown in the coroutine
>> return an errored or excepted result with the thrown exception instead
>> of throwing the exception through the coroutine machinery (which in
>> current compilers, has a high likelihood of blowing up the program).
>> Both `eager<T>` and `lazy<T>` can accept any `T` as well. Both have been
>> tested and found working on VS2019 and clang 9.
>
> How hard would it be to also support Boost.Coroutine2?

Probably not particularly hard, though you'd need something like
BOOST_OUTCOME_COROUTINE2_TRY(), which is rather a mouthful to constantly
have to type.

Niall


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