Boost logo

Boost Users :

Subject: Re: [Boost-users] MPL. Nested Lambdas
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-02-20 20:24:59


On Sat, Feb 20, 2010 at 6:09 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> OvermindDL1 wrote:
>>
>> On Sat, Feb 20, 2010 at 1:21 PM, Steven Watanabe <watanabesj_at_[hidden]>
>> wrote:
>>
>>>
>>> dilas dilas wrote:
>>>
>>>>
>>>> Please, tell me if one can write nested lambda expressions like
>>>>
>>>> "
>>>> template<class Result, class Seq, class Elem> struct pairs:
>>>> bm::fold<Seq,
>>>> Result, bm::push_back<_1,bm::pair<Elem, _2 > > >{};
>>>> template<class Seq1, class Seq2>
>>>> struct AllPairs: bm::fold<Seq1, bm::vector<>, pairs<_1,Seq2,_2> >{};
>>>> "
>>>>
>>>> without using intermediate metafunctions.
>>>>
>>>
>>> This ought to work, since the placeholders in AllPairs will be expanded
>>> before
>>> pairs is ever invoked.
>>>
>>
>> I do not know about Lambda, but I know that you can create
>> sub-functors in phoenix just fine, it has specific constructs for that
>> too.
>>
>> If you do not know, Boost.Phoenix is a complete replacement for
>> Boost.Lambda, plus a lot more.
>>
>> http://www.boost.org/doc/libs/1_42_0/libs/spirit/phoenix/doc/html/index.html
>
> Umm, Phoenix may be a replacement for Boost.Lambda, but it doesn't
> replace Boost.MPL.Lambda.

Ah, mis-read, ignore me. ^.^


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