Boost logo

Boost :

Subject: Re: [boost] [mpl]iter_fold_if Forward Backward rationale?
From: David Abrahams (dave_at_[hidden])
Date: 2009-04-03 22:31:04

on Thu Apr 02 2009, Larry Evans <> wrote:

> One reason I'm interested is that I can't figure out how reverse_fold
> would work on a sequence, S, such that begin<S>::type with just a
> forward iterator. I would have thought that you'd need a
> bidirectional iterator in order to traverse backwards; yet:
> shows that it works on lists.

More later, but remember there's recursion involved. You apply the
forward function "on the way in" and the reverse one "on the way out" of
the recursion.

Dave Abrahams
BoostPro Computing

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