diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index f7fa995b..22cb6ecd 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -59,13 +59,18 @@ namespace boost { namespace fusion template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)::type> + // MSVC9 issues a compile error as a partial specialization is ambiguous. + , typename boost::enable_if_has_type< + typename boost::disable_if_c::type::type + >::type> : BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)< SeqSize-1 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION::type , boost::result_of< F( - typename State::type const&, + typename add_reference::type>::type, BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It const) ) > @@ -103,7 +108,9 @@ namespace boost { namespace fusion typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION::type , boost::result_of< F( - typename State::type const&, + typename add_reference::type>::type, BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It const) ) >