diff --git a/include/boost/mpl/for_each.hpp b/include/boost/mpl/for_each.hpp index 524453a..58be86c 100644 --- a/include/boost/mpl/for_each.hpp +++ b/include/boost/mpl/for_each.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/apply.hpp" #include "boost/mpl/bool_c.hpp" #include "boost/mpl/lambda.hpp" +#include "boost/mpl/identity.hpp" #include "boost/mpl/aux_/unwrap.hpp" #include "boost/type_traits/is_same.hpp" @@ -72,7 +73,7 @@ struct for_each_impl // dwa 2002/9/10 -- make sure not to invoke undefined behavior // when we pass arg. value_initialized x; - aux::unwrap(f, 0)(get(x)); + aux::unwrap(f, 0)(boost::get(x)); typedef typename Iterator::next iter; for_each_impl::value>::execute( @@ -100,6 +101,16 @@ void for_each(F f, Sequence* = 0, TransformOp* = 0) (first*)0, (last*)0, (transform_op*)0, f); } +template< + typename Sequence + , typename F + > +inline +void for_each(F f, Sequence* = 0) +{ + for_each >(f); +} + } // namespace mpl } // namespace boost