
28 Jul
2008
28 Jul
'08
5:20 p.m.
AMDG noman javed wrote:
I want to apply some arbitrary function F on each element of a sequence through myfun class inherited from transform_view. I am unable to output the elements of the resultant sequence. Below is the whole code of my program
mpl::transform_view takes an MPL lambda expression rather than a function object, because it operates on types, not objects. (most MPL constructs take lambda expressions--mpl::for_each is a special case) #include <boost/mpl/times.hpp> ... typedef myfun<mpl::times<mpl::_1, mpl::_1>,numbers>::type newnum; In Christ, Steven Watanabe