|
Boost Users : |
Subject: Re: [Boost-users] [coroutine] help with code from docs
From: Jeff Flinn (jeffrey.flinn_at_[hidden])
Date: 2013-09-12 12:06:53
On 9/12/2013 11:56 AM, Oliver Kowalke wrote:
> void f( coro_t::caller_type & ca)
> {
> std::string str( ca.get() ); // asserts here!
>
> ca(7);
> }
>
> int main(int argc, char* argv[])
> {
> std::string str("abc");
>
> coro_t c(f);
>
>
> coro_t c( f, str); // pass str to ctor -> because accessed in f()
> int res = c.get(); // returned value
I see this approach described further down the page that I cited. Which
is inconsistent with the initial code sample on that page. So are you
saying the first code snippet in the docs is incorrect?
Thanks, jeff
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