Boost logo

Boost Users :

Subject: [Boost-users] Using function operator in lambda expression
From: Alexander Khomyak (Alexander.Khomyak_at_[hidden])
Date: 2011-06-02 07:32:05


Hi.

 

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. But I can't compile following code
using MS Visual Studio 2003.NET compiler:

 

#include <boost/lambda/lambda.hpp>

using namespace boost::lambda;

 

int foo(int i) { return i; }

 

Somewhere in main function:

 

(_1(1))(foo);

 

Could you give me example of using function call operator in lambda
expression?

In advance thank you very much.

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net