8 Jan
2006
8 Jan
'06
5 p.m.
Eduardo Bezerra
Hi,
I'm having a hard time trying to understand what the placeholders _1 and _2 mean in the context of the mpl::fold algorithm.
From the Boost.Mpl Reference manual:
typedef vector
types; typedef fold< types , int_<0> , if_< is_float<_2>,next<_1>,_1 >
::type number_of_floats;
BOOST_MPL_ASSERT_RELATION( number_of_floats::value, ==, 4 );
Could someone give me some help on this ?
<shameless plug> http://www.boost-consulting.com/mplbook contains a good explanation. -- Dave Abrahams Boost Consulting www.boost-consulting.com