
5 Oct
2012
5 Oct
'12
8:53 p.m.
On Fri, Oct 5, 2012 at 8:46 PM, Oliver Kowalke <oliver.kowalke@gmx.de>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