diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index 56302fb8..cf92a354 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -404,7 +404,7 @@ namespace boost { namespace fusion , State const , F >::type - BOOST_FUSION_FOLD_NAME(Seq& seq,State const& state,F f) + BOOST_FUSION_FOLD_NAME(Seq& seq, State const& state, F f) { return result_of::BOOST_FUSION_FOLD_NAME::call( state, @@ -418,13 +418,41 @@ namespace boost { namespace fusion , State const , F >::type - BOOST_FUSION_FOLD_NAME(Seq const& seq,State const& state,F f) + BOOST_FUSION_FOLD_NAME(Seq const& seq, State const& state, F f) { return result_of::BOOST_FUSION_FOLD_NAME::call( state, fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq), f); } + + template + inline typename result_of::BOOST_FUSION_FOLD_NAME< + Seq + , State const + , F + >::type + BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f) + { + return result_of::BOOST_FUSION_FOLD_NAME::call( + state, + fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq), + f); + } + + template + inline typename result_of::BOOST_FUSION_FOLD_NAME< + Seq const + , State const + , F + >::type + BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f) + { + return result_of::BOOST_FUSION_FOLD_NAME::call( + state, + fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq), + f); + } }} #undef BOOST_FUSION_FOLD_NAME