diff --git a/include/boost/mpl/advance.hpp b/include/boost/mpl/advance.hpp index a596724..24d2b68 100644 --- a/include/boost/mpl/advance.hpp +++ b/include/boost/mpl/advance.hpp @@ -46,10 +46,13 @@ namespace aux { template< typename Category, typename Iterator, typename N > struct advance_impl { + typedef typename less< N,integral_c >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + typedef typename if_< - typename less< N,integral_c >::type - , aux::advance_backward< ::boost::mpl::negate::value > - , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(N)::value > + backward_ + , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > >::type algo_; typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type; diff --git a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp index d4cbe9e..002197e 100644 --- a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp +++ b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp @@ -45,7 +45,7 @@ struct is_msvc_eti_arg { static no_tag test(...); static yes_tag test(eti_int_convertible); - static T get(); + static T& get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(test(get())) == sizeof(yes_tag) diff --git a/include/boost/mpl/distance.hpp b/include/boost/mpl/distance.hpp index 2355f7b..346750e 100644 --- a/include/boost/mpl/distance.hpp +++ b/include/boost/mpl/distance.hpp @@ -42,7 +42,7 @@ template< typename Category, typename First, typename Last > struct distance_impl : iter_fold< iterator_range - , integral_c + , integral_c , next<> > { @@ -81,7 +81,7 @@ struct distance_impl template< typename First, typename Last > struct result_ : iter_fold< iterator_range - , integral_c + , integral_c , next<> > {