From 981f71d04f683436847835d120ae688990560dc9 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sun, 1 Nov 2015 11:10:11 +0900 Subject: [PATCH 1/9] Use boost::enable_if_has_type instead. --- .../fusion/functional/invocation/invoke.hpp | 8 ++++---- .../invocation/invoke_function_object.hpp | 10 ++++------ .../functional/invocation/invoke_procedure.hpp | 4 ++-- .../boost/fusion/support/detail/enabler.hpp | 18 ------------------ test/compile_time/sfinae_friendly.hpp | 5 ++--- 5 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 include/boost/fusion/support/detail/enabler.hpp diff --git a/include/boost/fusion/functional/invocation/invoke.hpp b/include/boost/fusion/functional/invocation/invoke.hpp index b79ff5b4..09f3ead8 100644 --- a/include/boost/fusion/functional/invocation/invoke.hpp +++ b/include/boost/fusion/functional/invocation/invoke.hpp @@ -39,9 +39,9 @@ #include #include +#include #include -#include #include #include #include @@ -148,7 +148,7 @@ namespace boost { namespace fusion template struct invoke::type, Sequence >::result_type @@ -195,7 +195,7 @@ namespace boost { namespace fusion template struct invoke_impl::type >::type> { @@ -289,7 +289,7 @@ namespace boost { namespace fusion template struct invoke_impl::BOOST_PP_CAT(T, j) typename boost::result_of::type >::type> diff --git a/include/boost/fusion/functional/invocation/invoke_function_object.hpp b/include/boost/fusion/functional/invocation/invoke_function_object.hpp index 3ed508dd..2a88eaec 100644 --- a/include/boost/fusion/functional/invocation/invoke_function_object.hpp +++ b/include/boost/fusion/functional/invocation/invoke_function_object.hpp @@ -18,14 +18,12 @@ #include #include +#include #include #include -#include - #include -#include #include #include #include @@ -62,7 +60,7 @@ namespace boost { namespace fusion template struct invoke_function_object::type, Sequence >::result_type @@ -110,7 +108,7 @@ namespace boost { namespace fusion template struct invoke_function_object_impl::type >::type> { @@ -151,7 +149,7 @@ namespace boost { namespace fusion template struct invoke_function_object_impl::type >::type> #undef M diff --git a/include/boost/fusion/functional/invocation/invoke_procedure.hpp b/include/boost/fusion/functional/invocation/invoke_procedure.hpp index a0fe73a6..971ddbfd 100644 --- a/include/boost/fusion/functional/invocation/invoke_procedure.hpp +++ b/include/boost/fusion/functional/invocation/invoke_procedure.hpp @@ -20,6 +20,7 @@ #include #include +#include #include @@ -28,7 +29,6 @@ #include #include -#include #include #include #include @@ -66,7 +66,7 @@ namespace boost { namespace fusion template struct invoke_procedure::type,Sequence >::result_type diff --git a/include/boost/fusion/support/detail/enabler.hpp b/include/boost/fusion/support/detail/enabler.hpp deleted file mode 100644 index 48b69f32..00000000 --- a/include/boost/fusion/support/detail/enabler.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2015 Kohei Takahashi - - Use modification and distribution are subject to the Boost Software - License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt). -==============================================================================*/ -#ifndef FUSION_DETAIL_ENABLER_02082015_163810 -#define FUSION_DETAIL_ENABLER_02082015_163810 - -namespace boost { namespace fusion { namespace detail -{ - template - struct enabler { typedef T type; }; -}}} - -#endif - diff --git a/test/compile_time/sfinae_friendly.hpp b/test/compile_time/sfinae_friendly.hpp index 1111cd8c..9d0b866c 100644 --- a/test/compile_time/sfinae_friendly.hpp +++ b/test/compile_time/sfinae_friendly.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE) @@ -20,8 +21,6 @@ namespace sfinae_friendly { - template struct void_ { typedef T type; }; - template struct arg_; template struct arg_ { typedef T type; }; @@ -30,7 +29,7 @@ namespace sfinae_friendly : boost::mpl::true_ { }; template - struct check::type> + struct check::type> : boost::mpl::false_ { }; struct unspecified {}; From 4d3891ed3165969c49079a2a63aec362d54b2a04 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Sat, 7 Nov 2015 16:11:06 -0500 Subject: [PATCH 2/9] Remove invalid odr-usages of boost::declval. --- include/boost/fusion/container/vector/vector.hpp | 5 ++--- .../boost/fusion/view/detail/strictest_traversal.hpp | 10 ++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index df306714..fb6a6f8b 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -272,8 +271,8 @@ namespace boost { namespace fusion } template - static BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - U value_at_impl(store*) { return boost::declval(); } + static BOOST_FUSION_GPU_ENABLED + U value_at_impl(store*); }; template diff --git a/include/boost/fusion/view/detail/strictest_traversal.hpp b/include/boost/fusion/view/detail/strictest_traversal.hpp index d1aa7883..4092ea4d 100644 --- a/include/boost/fusion/view/detail/strictest_traversal.hpp +++ b/include/boost/fusion/view/detail/strictest_traversal.hpp @@ -17,9 +17,6 @@ #include #include #include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#include -#endif namespace boost { namespace fusion { @@ -62,12 +59,9 @@ namespace boost { namespace fusion // never called, but needed for decltype-based result_of (C++0x) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED typename result::type - operator()(StrictestSoFar&&, Next&&) const - { - return boost::declval::type>(); - } + operator()(StrictestSoFar&&, Next&&) const; #endif }; From 74c0d5d0ecd0c9d8a31b9a642432a5171d005df3 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Tue, 10 Nov 2015 10:55:13 +0100 Subject: [PATCH 3/9] Fix fusion::at, N> for C array types --- include/boost/fusion/container/vector/detail/value_at_impl.hpp | 2 +- include/boost/fusion/container/vector/vector.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/container/vector/detail/value_at_impl.hpp b/include/boost/fusion/container/vector/detail/value_at_impl.hpp index 3d748afd..7d134054 100644 --- a/include/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -47,7 +47,7 @@ namespace boost { namespace fusion struct apply { typedef typename boost::remove_cv::type seq; - typedef decltype(seq::template value_at_impl(boost::declval())) type; + typedef typename decltype(seq::template value_at_impl(boost::declval()))::type type; }; }; } diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index fb6a6f8b..845a019e 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -272,7 +272,7 @@ namespace boost { namespace fusion template static BOOST_FUSION_GPU_ENABLED - U value_at_impl(store*); + mpl::identity value_at_impl(store*); }; template From 3298875eccb727291ecbafaa6c7dda9be43be557 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Tue, 10 Nov 2015 14:04:16 +0100 Subject: [PATCH 4/9] Add double identity trick for fast value_at (vectors) This is a workaround to make decltype(expr)::type compiles with old compilers. --- include/boost/fusion/container/vector/detail/value_at_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/fusion/container/vector/detail/value_at_impl.hpp b/include/boost/fusion/container/vector/detail/value_at_impl.hpp index 7d134054..6c8c41fb 100644 --- a/include/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -47,7 +47,7 @@ namespace boost { namespace fusion struct apply { typedef typename boost::remove_cv::type seq; - typedef typename decltype(seq::template value_at_impl(boost::declval()))::type type; + typedef typename mpl::identity(boost::declval()))>::type::type type; }; }; } From 0c18e85ecd872ee83d1bc0f081a4658fb111d813 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Fri, 13 Nov 2015 20:03:12 +0900 Subject: [PATCH 5/9] 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 From 7cf404d096b02cf54d1816b2b3c83bf02b44ccd8 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Fri, 13 Nov 2015 21:49:27 +0900 Subject: [PATCH 6/9] SFINAE expression obstructs compile on MSVC 8. --- .../boost/fusion/algorithm/iteration/detail/fold.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index c8095ae9..947c409d 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -42,6 +42,12 @@ # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT) #endif +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +#else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +#endif + namespace boost { namespace fusion { namespace detail @@ -57,7 +63,7 @@ namespace boost { namespace fusion 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 @@ -75,7 +81,7 @@ namespace boost { namespace fusion // workaround won't work with MSVC 9. typename boost::disable_if_c::type::type #else - typename State::type + BOOST_FUSION_FOLD_IMPL_ENABLER(State) #endif >::type #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) @@ -236,6 +242,7 @@ namespace boost { namespace fusion }} #undef BOOST_FUSION_FOLD_NAME +#undef BOOST_FUSION_FOLD_IMPL_ENABLER #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION #undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM From 1c05cfc795a2401a317529711a1f34d6a554abfd Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sat, 14 Nov 2015 20:34:41 +0900 Subject: [PATCH 7/9] Regenerate fusion::fold family. --- .../algorithm/iteration/detail/fold.hpp | 57 ++++++++++++++++--- .../iteration/detail/preprocessed/fold.hpp | 32 +++++++++-- .../detail/preprocessed/iter_fold.hpp | 32 +++++++++-- .../detail/preprocessed/reverse_fold.hpp | 32 +++++++++-- .../detail/preprocessed/reverse_iter_fold.hpp | 32 +++++++++-- 5 files changed, 162 insertions(+), 23 deletions(-) diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index 947c409d..e6923a3f 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -9,6 +9,8 @@ ==============================================================================*/ #include +#define FUSION_HASH # + #ifdef BOOST_FUSION_REVERSE_FOLD # ifdef BOOST_FUSION_ITER_FOLD # define BOOST_FUSION_FOLD_NAME reverse_iter_fold @@ -42,10 +44,18 @@ # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT) #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) -# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +#if (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) +FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500) +FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +FUSION_HASH else +FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +FUSION_HASH endif #else -# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# if BOOST_WORKAROUND(BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +# else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# endif #endif namespace boost { namespace fusion @@ -53,9 +63,16 @@ namespace boost { namespace fusion namespace detail { template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME) @@ -64,8 +81,15 @@ namespace boost { namespace fusion template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<0,It,State,F , typename boost::enable_if_has_type::type -#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500) +#endif +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \ + (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) , true +#endif +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH endif #endif > { @@ -75,17 +99,35 @@ namespace boost { namespace fusion template struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)::type::type +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH else + BOOST_FUSION_FOLD_IMPL_ENABLER(State) +#endif #else BOOST_FUSION_FOLD_IMPL_ENABLER(State) +#endif +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH endif #endif >::type -#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500) +#endif +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \ + (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) , false +#endif +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH endif #endif > : BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)< @@ -249,3 +291,4 @@ namespace boost { namespace fusion #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM #undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM #undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM +#undef FUSION_HASH diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp index eb5bc9ab..3b50edec 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp @@ -8,25 +8,49 @@ This is an auto-generated file. Do not edit! ==============================================================================*/ +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +# else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# endif namespace boost { namespace fusion { namespace detail { - template + template struct result_of_it_fold {}; template struct result_of_it_fold<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 result_of_it_fold::type::type - >::type> +# else + BOOST_FUSION_FOLD_IMPL_ENABLER(State) +# endif + >::type +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) + , false +# endif + > : result_of_it_fold< SeqSize-1 , typename result_of::next::type diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp index 3895526c..221da17a 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp @@ -7,25 +7,49 @@ This is an auto-generated file. Do not edit! ==============================================================================*/ +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +# else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# endif namespace boost { namespace fusion { namespace detail { - template + template struct result_of_it_iter_fold {}; template struct result_of_it_iter_fold<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 result_of_it_iter_fold::type::type - >::type> +# else + BOOST_FUSION_FOLD_IMPL_ENABLER(State) +# endif + >::type +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) + , false +# endif + > : result_of_it_iter_fold< SeqSize-1 , typename result_of::next::type diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp index a6705b08..a29f9e28 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp @@ -7,25 +7,49 @@ This is an auto-generated file. Do not edit! ==============================================================================*/ +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +# else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# endif namespace boost { namespace fusion { namespace detail { - template + template struct result_of_it_reverse_fold {}; template struct result_of_it_reverse_fold<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 result_of_it_reverse_fold::type::type - >::type> +# else + BOOST_FUSION_FOLD_IMPL_ENABLER(State) +# endif + >::type +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) + , false +# endif + > : result_of_it_reverse_fold< SeqSize-1 , typename result_of::prior::type diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp index b6101cb1..97aac5a7 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp @@ -7,25 +7,49 @@ This is an auto-generated file. Do not edit! ==============================================================================*/ +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void +# else +# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type +# endif namespace boost { namespace fusion { namespace detail { - template + template struct result_of_it_reverse_iter_fold {}; template struct result_of_it_reverse_iter_fold<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 result_of_it_reverse_iter_fold::type::type - >::type> +# else + BOOST_FUSION_FOLD_IMPL_ENABLER(State) +# endif + >::type +# if BOOST_WORKAROUND (BOOST_MSVC, < 1500) + , false +# endif + > : result_of_it_reverse_iter_fold< SeqSize-1 , typename result_of::prior::type From 87fffbead3787466f2f2223f55819ac34d63e452 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sat, 14 Nov 2015 23:32:46 +0900 Subject: [PATCH 8/9] Fix conditional of workaround. --- include/boost/fusion/algorithm/iteration/detail/fold.hpp | 4 ++-- .../fusion/algorithm/iteration/detail/preprocessed/fold.hpp | 2 +- .../algorithm/iteration/detail/preprocessed/iter_fold.hpp | 2 +- .../algorithm/iteration/detail/preprocessed/reverse_fold.hpp | 2 +- .../iteration/detail/preprocessed/reverse_iter_fold.hpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/fold.hpp index e6923a3f..4c82b800 100644 --- a/include/boost/fusion/algorithm/iteration/detail/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -100,9 +100,9 @@ FUSION_HASH endif struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)= 1500) #endif -#if BOOST_WORKAROUND(BOOST_MSVC, == 1500) || \ +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1500) || \ (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) // Following SFINAE enables to avoid MSVC 9's partial specialization // ambiguous bug but MSVC 8 don't compile, and moreover MSVC 8 style diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp index 3b50edec..c23ba16c 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp @@ -38,7 +38,7 @@ namespace boost { namespace fusion template struct result_of_it_fold= 1500) diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp index 221da17a..d49a8685 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion template struct result_of_it_iter_fold= 1500) diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp index a29f9e28..4b3b3b1e 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion template struct result_of_it_reverse_fold= 1500) diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp index 97aac5a7..10bd9c7d 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion template struct result_of_it_reverse_iter_fold= 1500) From 8767d374ea7c031788f5519ae8e4d5a40d47fe49 Mon Sep 17 00:00:00 2001 From: fiesh Date: Mon, 23 Nov 2015 17:21:59 +0100 Subject: [PATCH 9/9] manip.hpp: Do not use "using namespace std;" Changed "using namespace std; ws()" into "std::ws()" to avoid ambiguities with a possible "::ws" namespace. --- include/boost/fusion/sequence/io/detail/manip.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/fusion/sequence/io/detail/manip.hpp b/include/boost/fusion/sequence/io/detail/manip.hpp index ec8ce304..68f7ab4f 100644 --- a/include/boost/fusion/sequence/io/detail/manip.hpp +++ b/include/boost/fusion/sequence/io/detail/manip.hpp @@ -110,8 +110,7 @@ namespace boost { namespace fusion { // read a delimiter string_type const* p = stream_data_t::get(stream); - using namespace std; - ws(stream); + std::ws(stream); if (p) {