$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [coroutine] help with code from docs
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-09-12 11:56:38
>
> 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