|
Proto : |
Subject: Re: [proto] : Proto transform with state
From: Eric Niebler (eric_at_[hidden])
Date: 2011-01-29 07:49:33
On 11/18/2010 4:56 AM, Eric Niebler wrote:
> I think Proto transforms need a "let" statement for storing intermediate
> results. Maybe something like this:
>
> struct RenumberFun
> : proto::fold<
> _
> , make_pair(fusion::vector0<>(), proto::_state)
> , let<
> _a( Renumber(_, second(proto::_state))> )
> , make_pair(
> push_back(
> first(proto::_state)
> , first(_a)
> )
> , second(_a)
> )
> >
> >
> {};
>
> I haven't a clue how this would be implemented.
>
> It's fun to think about this stuff, but I wish it actually payed the bills.
Bills be damned. I just committed to trunk an implementation of
proto::let, along with tests and reference docs. End-user docs are still
todo.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Proto list run by eric at boostpro.com