Hi Yu, I happen to have finished reading lambda docs just a while ago... :-) std::cout << (_1 + _2)(boost::lambda::make_const(10), boost::lambda::make_const(10)); std::cout << std::endl; does the job. You have to be careful about passing constants as arguments, see docs for details. As for std::endl, the problem is that the resulting value (result of std::cout << _lambda_expression_) has some special type. There are some workarounds, try googling on that if this worries you. Cheers, Filip
Hi,
It seems that the lambda manual lacks of a simple working example.
I'm made up the following example. But it's not working. Could you please show me how to make it work?
Thanks, Peng
#include
#include #include <iostream> using namespace boost::lambda;
int main() { std::cout << (_1 + _2)(10, 10) << std::endl; } _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Filip Konvic(ka LOGIS, s.r.o. tel. +420 556 841 100 mob. +420 736 758 714