I saw several related questions, but I'm still just puzzled. What is wrong with this syntax:
boost::function<int (int)> g = f; boost::function<int (int)> g2 = 2*g(boost::lambda::_1);
I tried it with a boost of 1.35 and 1.38 (these are the two installations that I lay) on gcc 4.3.4, and both of them give error variations:
no match for call to '(boost::function<int ()(int)>) (const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >&)'
source share