diff --git a/include/boost/mpl/if.hpp b/include/boost/mpl/if.hpp index 0ef343e..fc4af00 100644 --- a/include/boost/mpl/if.hpp +++ b/include/boost/mpl/if.hpp @@ -73,6 +73,84 @@ struct if_ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2)) }; + +#ifndef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT + +// Aleksey, check it out: lazy if_ evaluation in lambdas! +// I think this doesn't handle the case of +// +// _1, bar<_2>, baz<_2> > +// +// (or however it is that you express that... when the ordinary bind3 +// computes the function based on the actual arguments). That leads me +// to think that some kind of true currying might be a better +// approach, e.g.: +// +// +// boost::mpl::bind3< +// boost::mpl::quote3 +// , boost::mpl::bind1, boost::mpl::arg<1> > +// , boost::mpl::arg<1> +// , boost::mpl::bind1, boost::mpl::arg<1> > +// >::apply<...> +// +// becomes: +// +// boost::mpl::bind< +// boost::mpl::quote3 +// >::bind< +// , boost::mpl::bind1, +// boost::mpl::arg<1> > +// >::bind< +// boost::mpl::arg<1> +// >::bind< +// boost::mpl::bind1, boost::mpl::arg<1> > +// >::apply<...> +// +// so that after the 2nd bind we have a different function depending +// on the result of is_reference. + +template struct bind3; +template