Boost logo

Boost Users :

Subject: Re: [Boost-users] chaining functions input output
From: Igor R (boost.lists_at_[hidden])
Date: 2012-09-19 06:54:18


> On 19 September 2012 11:04, Igor R <boost.lists_at_[hidden]> wrote:
>>> i have these 2 functions provided to me and I wonder whether they can
>>> somehow be chained without using intermediary memory?
>>>
>>> http://codepad.org/tTwkUQhp
>>
>>
>> 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/


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