Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] new versions
From: Nat Linden (nat_at_[hidden])
Date: 2012-10-05 14:10:03


On Fri, Oct 5, 2012 at 11:22 AM, Oliver Kowalke <oliver.kowalke_at_[hidden]> wrote:

> Version 1) requires that coroutine-fn has only one argument ==
> coroutine<>::self_t. Other arguments are accessed via
> coroutine<>::self_t::get< int >() and results via coroutine<>::get().
> interface provides input/output iterators.

I'm not sure this is an improvement over having yield() return a
tuple. I guess that discussion must've taken place on the developers
list.

> Version 2) requires that coroutine-fn has only one argument too ==
> coroutine<> with inverted signature.

The signature inversion thing makes me uneasy. Although I don't yet
have a definite case in mind, I worry that would make it difficult to
synthesize a coroutine as a helper object in generic code that needs
to deal with arbitrary signatures.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net