On 3/14/07, Filip Konvic(ka
wrote: 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,
Thank you for your pointer. I don't have enough time to read through all the manual. Can you point to me which particular section I should read for this problem?
Thanks, Peng
Sure: http://www.boost.org/doc/html/lambda/le_in_details.html#lambda.rvalues_as_ac... http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Suggestions_-... Cheers, Filip