$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [coroutine] interface suggestion
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-19 08:23:05
I forgot a suggestion made by Vicente:
5.a coroutine<>::caller_t provides function bind() which must be called
after coroutine::caller_t::yield() returned in order to get the
parameters
int f( caller_t & c, strg & s, int x) {
c.yield( 7); // alternative c( 7)
c.bind( s, x); // s and x will contain new values given by caller
}
alternative: because the user could forget to invoke bind():
int f( caller_t & c, strg & s, int x) {
c.yield( 7, s, x); // alternative c( 7, s ,x)
}
Oliver