From 59dfeec8157c419fabfb2a26f2412547d9a18d85 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Tue, 8 Sep 2015 00:18:37 +0900 Subject: [PATCH] Add workarounds for older MSVC. --- .../fusion/algorithm/iteration/detail/fold.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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) ) >