我正在尝试将函数对象列表应用于以下代码中的某个值。但是这段代码会导致
错误
boost_1_44\boost\fusion\algorithm\iteration\detail\for_each.hpp(82): error C2064:
如何将函数对象列表应用于某个值?
double doublef2(double x,double y){return 2*x+y; }
double doublef3(double x,double y){return 3*x*y; }
double doublef4(double x,double y){return 4+x*y; }
main(){
boost::fusion::vector<
boost::function<double (double,double)>,
boost::function<double (double,double)>,
boost::function<double (double,double)>
> tt;
boost::fusion::at_c<0>(tt)= & doublef2;
boost::fusion::at_c<1>(tt)= & doublef3;
boost::fusion::at_c<2>(tt)= & doublef4;
boost::fusion::for_each(tt, std::cout << boost::lambda::_1(10,100) << '\n');
}