19 Sep
2012
19 Sep
'12
10:54 a.m.
On 19 September 2012 11:04, Igor R
wrote: i have these 2 functions provided to me and I wonder whether they can somehow be chained without using intermediary memory?
No. You have to supply a range [begin..end) for fun2(), so this range should be prepared first.
someone mentioned boost.coroutine could help in this case?
Not with the signatures you specified. If *you* define and implement these templates (i.e. they are not from a 3d party), and you want to adjust their signatures and implementations to make them a generator/coroutine, then maybe it's feasible... http://ok73.ok.funpic.de/boost/libs/coroutine/doc/html/