|
Boost : |
Subject: Re: [boost] [coroutine] new versions
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2012-10-05 16:53:16
On Fri, Oct 5, 2012 at 8:46 PM, Oliver Kowalke <oliver.kowalke_at_[hidden]>wrote:
> [snip]
>> struct a{};
>> struct b{};
>> typedef coroutine< int( tagged<int, a>, tagged<int,b> > > coro_t;
>> int fn( coro_t::self_t & c) {
>> int x = c.get< a >();
>> int y = c.get< b >();
>> c.yield( x +y);
>> ...
>> }
>>
>> Anyway, maybe the use of the get accessor can be made more readable
> without effort using tags
> does boost.tuple provide such a facility?
>
>
no, but boost.fusion does. Maybe coroutine should only support unary
arguments/results and let the user choose its preferred "packaging" by
explicitly specifying tuple or fusion map/sets? I do not have a strong
opinion on this.
-- gpd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk