
19 Oct
2006
19 Oct
'06
5:03 a.m.
Hi, I would like to create a boost::function to a lambda::bind functor such as float fx(float a, float b) { return a+b; } int main() { boost::function<float(float)> f = boost::lambda::bind(fx,_2,2); std::cout << f(3) << std::endl; return 0; } I would expect this to bind 2 to the "b" argument of fx, and print "5". Instead with msvc-8.0 I get a bunch or compile errors. Any help would be greatly appreciated. Chris