Boost logo

Boost :

Subject: Re: [boost] compile-time for-loop
From: Larry Evans (cppljevans_at_[hidden])
Date: 2009-09-01 06:00:06


On 09/01/09 03:12, klaus triendl wrote:
> I wonder whether a compile-time for-loop is useful enough so that it would
> get included in the mpl library;
> it's very similar to what fold does but it can be used for computations with
> types other than sequence
> containers.
>
>
> The loop construct takes a start value, a loop condition and a
> function calculating the next start value for the next loop recursion and
> additionally a state together with a binary operation serving as loop
> body:
[snip]
This sounds like while_recur found here:

  https://svn.boost.org/trac/boost/attachment/ticket/3044/while_recur.cpp

This was part of a proposed patch to mpl's iter_fold_if to solve
a problem another booster had:

http://article.gmane.org/gmane.comp.lib.boost.devel/190874/match=or_seq

However, for some reason (people too busy or maybe there's some
bug someone's seen in while_recur), the topic's cooled off since
there's no posts since 6/10/2009 :(


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk