|
Boost : |
Subject: Re: [boost] [mpl][fold.html] apply<op, _1, deref<_2> > correction needed.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-11 12:38:08
AMDG
Larry Evans wrote:
> The vault file:
>
> http://preview.tinyurl.com/cbr9k3
>
> demonstrates the bug. What's the correct
> value for the ForwardOp arg to iter_fold in
> http://www.boost.org/doc/libs/1_38_0/libs/mpl/doc/refmanual/fold.html?
I'm very confused. First of all, in the
assertions, you probably want boost::mpl::equal_to
instead of boost::mpl::equal.
Second, I don't see fold or iter_fold at all.
Finally, when you use a lambda expression
inside another lambda expression, you need
to wrap it in protect.
mpl::apply<mpl::apply<op_meta_fun_elem<_1, _2>, _1, mpl::deref<_2> >,
state0, iter0>::type
is guaranteed to behave strangely, because all the placeholders
will be substituted by the outermost apply.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk