
I would like to use mpl::lambda in nest. In this case works fine. --------- typedef boost::mpl::lambda<boost::mpl::max<boost::mpl::_1,boost::mpl::_2>
my_max; typedef boost::mpl::fold< boost::mpl::vector_c<int,1,7,0,-2,5,-1> , boost::mpl::int_<6> //, boost::mpl::max<boost::mpl::_1,boost::mpl::_2> , my_max >::type r2;
BOOST_MPL_ASSERT(( boost::is_same< r2, boost::mpl::integral_c<int, 7> > )); --------- However --------- typedef boost::mpl::lambda< boost::mpl::fold< boost::mpl::_1 ,boost::mpl::front<boost::mpl::_1> ,my_max >::type >::type my_max_types; typedef my_max_types::apply<boost::mpl::vector_c<int,1,7,0,-2,5,-1>
::type r3;
BOOST_MPL_ASSERT(( boost::is_same< r3, boost::mpl::integral_c<int, 7> > )); ///error => becomes boost::mpl::integral_c<int, 1> --------- How to define such nest lambda in mpl?