|
Boost : |
Subject: Re: [boost] [coroutine] interface suggestion
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-21 02:34:00
> * bind can not be used with references, limiting the coroutine interface
> to don't use references is not a solution.
yes, I hoped to use bind to store new values in the parameters of coroutine-fn so that the user could still used the fn parameters as in a usual function,. unfortunately it does not work with references.
> * access to the coroutine parameter using get, while it ensures a
> uniform and safe way to obtain them, is not easier to read, and in this
> case the coroutine function shouldn't follow the coroutine signature,
> which for some of you make the interface type unsafe.
seams to be a decision between 'tuple<> self_t::yield()' and void 'self_t::yield()' + 'T self_t::get<>()'.
The design with get<>() is not hard to implement because I store already the tuple of fn parameters inside.
Oliver
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk