From 104f508ceff0676148413188f381b13e06d48321 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Mon, 7 Mar 2016 19:42:23 +0900 Subject: [PATCH 1/6] Remove outdated comment. --- include/boost/fusion/container/vector/vector.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 6c9c44fe..65bffd0b 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -278,7 +278,6 @@ namespace boost { namespace fusion }; } // namespace boost::fusion::vector_detail - // This class provides backward compatibility: vector. template struct vector : vector_detail::vector_data< From a8b70d6679b88a6b9fd9e3777c1d7390d460481b Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Tue, 8 Mar 2016 14:43:32 +0900 Subject: [PATCH 2/6] Workaround for ICE on GCC 4.0.0. --- include/boost/fusion/view/single_view/detail/next_impl.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/view/single_view/detail/next_impl.hpp b/include/boost/fusion/view/single_view/detail/next_impl.hpp index 41c658f3..55a4ff11 100644 --- a/include/boost/fusion/view/single_view/detail/next_impl.hpp +++ b/include/boost/fusion/view/single_view/detail/next_impl.hpp @@ -39,7 +39,10 @@ namespace boost { namespace fusion static type call(Iterator const& i) { - BOOST_STATIC_ASSERT((type::position::value < 2)); + // Workaround for ICE on GCC 4.0.0. + // see https://svn.boost.org/trac/boost/ticket/5808 + typedef typename type::position position; + BOOST_STATIC_ASSERT((position::value < 2)); return type(i.view); } }; From 275236f86e78c44475f59f4981f56e94a5c55ea4 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Tue, 8 Mar 2016 15:36:21 +0900 Subject: [PATCH 3/6] Workaround for ICE on GCC 4.0 and 4.1. --- .../detail/segmented_iterator_range.hpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index d35e580f..a4148c76 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -8,6 +8,7 @@ #define BOOST_FUSION_SEGMENTED_ITERATOR_RANGE_HPP_INCLUDED #include +#include #include #include #include @@ -409,11 +410,14 @@ namespace boost { namespace fusion { namespace detail template < typename StackBegin , typename StackEnd - , bool SameSegment = - result_of::equal_to< + , bool SameSegment +#if BOOST_WORKAROUND(BOOST_GCC, < 40000) || BOOST_WORKAROUND(BOOST_GCC, >= 40200) + = result_of::equal_to< typename StackBegin::car_type::begin_type , typename StackEnd::car_type::begin_type - >::type::value> + >::type::value +#endif + > struct make_segmented_range_reduce2 { typedef @@ -480,7 +484,14 @@ namespace boost { namespace fusion { namespace detail template struct make_segmented_range_reduce - : make_segmented_range_reduce2 + : make_segmented_range_reduce2= 40000) || BOOST_WORKAROUND(BOOST_GCC, < 40200) + , result_of::equal_to< + typename StackBegin::car_type::begin_type + , typename StackEnd::car_type::begin_type + >::type::value +#endif + > {}; template From 12b25c2c99460db03b9e2e7f7c1a91ce1278611e Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Wed, 9 Mar 2016 10:19:22 +0900 Subject: [PATCH 4/6] Correct workaround condition. --- .../view/iterator_range/detail/segmented_iterator_range.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index a4148c76..4b2c11eb 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -411,7 +411,7 @@ namespace boost { namespace fusion { namespace detail typename StackBegin , typename StackEnd , bool SameSegment -#if BOOST_WORKAROUND(BOOST_GCC, < 40000) || BOOST_WORKAROUND(BOOST_GCC, >= 40200) +#if !(BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200)) = result_of::equal_to< typename StackBegin::car_type::begin_type , typename StackEnd::car_type::begin_type @@ -485,7 +485,7 @@ namespace boost { namespace fusion { namespace detail template struct make_segmented_range_reduce : make_segmented_range_reduce2= 40000) || BOOST_WORKAROUND(BOOST_GCC, < 40200) +#if BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200) , result_of::equal_to< typename StackBegin::car_type::begin_type , typename StackEnd::car_type::begin_type From 82f24e0f7391dd70f7cbf5499b231c1f0cfb4e15 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Fri, 11 Mar 2016 01:01:12 +0900 Subject: [PATCH 5/6] Tweak std::tuple test for GCC 4.4 due to https://gcc.gnu.org/PR41530 . --- test/sequence/std_tuple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequence/std_tuple.cpp b/test/sequence/std_tuple.cpp index 2495fa55..257fd850 100644 --- a/test/sequence/std_tuple.cpp +++ b/test/sequence/std_tuple.cpp @@ -27,7 +27,7 @@ main() { // conversion vector to std tuple - std::tuple t = convert(make_vector(123, "Hola!!!")); + std::tuple t = convert(make_vector(123, std::string("Hola!!!"))); BOOST_TEST(std::get<0>(t) == 123); BOOST_TEST(std::get<1>(t) == "Hola!!!"); } From 318958085761d4699d2e19e17a70647902857553 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Wed, 16 Mar 2016 20:25:59 +0900 Subject: [PATCH 6/6] Added workaround for GCC 3.4 due to ambiguous. NOTE: GCC 3.3 and earlier are not supported officially by Boost community. --- include/boost/fusion/sequence/convert.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/sequence/convert.hpp b/include/boost/fusion/sequence/convert.hpp index b367714c..534d991a 100644 --- a/include/boost/fusion/sequence/convert.hpp +++ b/include/boost/fusion/sequence/convert.hpp @@ -8,6 +8,14 @@ #define FUSION_CONVERT_10022005_1442 #include +#if BOOST_WORKAROUND(BOOST_GCC, < 30500) +#include +#include +#define BOOST_FUSION_WA_GCC34(type1, type2) \ + boost::lazy_disable_if, type1, type2> +#else +#define BOOST_FUSION_WA_GCC34(type1, type2) type1, type2 +#endif namespace boost { namespace fusion { @@ -32,7 +40,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename result_of::convert::type + inline typename BOOST_FUSION_WA_GCC34(result_of::convert)::type convert(Sequence& seq) { typedef typename result_of::convert::gen gen; @@ -49,4 +57,5 @@ namespace boost { namespace fusion } }} +#undef BOOST_FUSION_WA_GCC34 #endif