Iain K.Hanson wrote:
> I'm having a problem using fold with the example from the reference
> page. I can get the following example from copy to comile as fold
>
> namespace mpl = boost::mpl;
> using mpl::_;
>
> typedef mpl::vector10_c answer;
>
> typedef mpl::fold<
> mp
> [mailto:[EMAIL PROTECTED]]On Behalf Of Aleksey Gurtovoy
> Sent: 12 December 2002 22:53
>
>
> >
> > typedef mpl::lambda< number_of_floats >::type func;
>
> Just a quibble - the above line is unnecessary.
Thanks. I didn't think it was but it was one of my attempts
to get it to compile.
>
Gennadiy Rozental wrote:
> Would it correct to state that following pseudo-code properly
> reflect the essence of the appropriate algorithms:
>
> iter_fold( sequence s, state st, binary_operator op ) {
>iterator it = s.begin();
>
>while( it != s.end() )
>st = op( st, it );
r