3 Jun
2011
3 Jun
'11
3:38 p.m.
"Alexander Khomyak" wrote:
According lambda documentation <http://www.boost.org/doc/libs/1_38_0/doc/html/lambda/le_in_details.html #lambda.operator_expressions> there is a possibility to use function call operator in lambda expression. ... (_1(1))(foo);
_1 is can be seen as a function object that returns its first argument. _1(1) calls that function object with 1, the result of which is 1. I think this is what you want: bind(_1, 1)(&foo); // Equivalent to foo(1) You have to include boost/lambda/bind.hpp to use bind.