Boost logo

Boost :

Subject: Re: [boost] [mpl]iter_fold_if Forward Backward rationale?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-05-29 17:02:55


David Abrahams wrote:
> on Tue May 19 2009, Larry Evans <> wrote:
>>> Alas. AFAICT, there are no tests or uses for the Backward Predicate
>>> in MPL.
>> However, there may be a use in the future.
> That's really no excuse ;-)
> I think this is probably a case of premature generalization.

Anything that can be done with the backward predicate can be done
by passing an appropriate boolean flag along with the result. Unlike the
forward predicate, there are no big-O gains from having the algorithm
know about it. The only case where it is significantly more convenient
to use the backward predicate is when doing both a forward and a reverse
operation. For this case, what is really needed is the ability to give
a lambda expression which will be used to package the result of the forward
operation for the backwards operation. (This is all premature
of course...)

In Christ,
Steven Watanabe

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