Boost logo

Boost :

From: Darren Cook (darren_at_[hidden])
Date: 2004-02-16 07:19:07

I've read the lambda sections of the FC++ docs, and the paper on the
subject, and am a bit confused how to use it. Could you show the FC++
equivalents of these BLL examples:

1. (from the paper)
   int a[]={5,3,8,4};

   int a[]={5,3,8,4};

3. (a vector of MyClass pointers)

        bind(delete_ptr(), _1)

5. (in a spirit parser)
     Node= +(
        (+range_p('A','Z'))[bind(&MyClass::on_name, this, _1,_2)]
>> +(
>> (*(anychar_p-']'))[bind(&MyClass::on_value, this, _1,_2)]
>> ch_p(']')


*: For each I'm doing something like:
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/lambda/construct.hpp>

using namespace boost::lambda;

Boost list run by bdawes at, gregod at, cpdaniel at, john at