|
Boost : |
Subject: Re: [boost] [coroutine] interface suggestion
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-20 03:18:05
> int f( caller_t & c, strg & s, int x) {
> caller_t::yield_t b = c.bind( s, x); // s and x are now used to
> store the next calls.
>
> b.yield( s.length() + x );
> // here s and x have been reassigned
> g(b);
>
> }
>
> void g( caller_t::yield_t & b) {
> b.yield( b.get<0>.length() + 2*b.get<1> );
> // here s and x have been reassigned
> }
do we really need the selft_t::get<>()? The signature of function g() says that it is not interested in variables s and x.
Oliver
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk