From 0c18e85ecd872ee83d1bc0f081a4658fb111d813 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Fri, 13 Nov 2015 20:03:12 +0900 Subject: [PATCH] Partly fixed fusion::fold regression for MSVC <=8. It implicitly includes MSVC 9's workaround. --- .../algorithm/iteration/detail/fold.hpp | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index ddc4d0af..c8095ae9 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -46,23 +46,42 @@ namespace boost { namespace fusion { namespace detail { - template + template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME) {}; template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<0,It,State,F - , typename boost::enable_if_has_type::type> + , typename boost::enable_if_has_type::type +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + , true +#endif + > { typedef typename State::type type; }; template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)::type::type - >::type> +#else + typename State::type +#endif + >::type +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + , false +#endif + > : BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)< SeqSize-1 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION::type