Boost logo

Boost Users :

From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2007-03-15 03:02:03


> On 3/14/07, Filip Konvic(ka <filip.konvicka_at_[hidden]> 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_actual_arguments
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Suggestions_-_Lambda_Library

Cheers,
Filip


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