summaryrefslogtreecommitdiff
path: root/boost/fusion/support
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/support')
-rw-r--r--boost/fusion/support/detail/enabler.hpp18
-rw-r--r--boost/fusion/support/detail/is_same_size.hpp29
-rw-r--r--boost/fusion/support/detail/result_of.hpp53
-rw-r--r--boost/fusion/support/segmented_fold_until.hpp5
4 files changed, 29 insertions, 76 deletions
diff --git a/boost/fusion/support/detail/enabler.hpp b/boost/fusion/support/detail/enabler.hpp
deleted file mode 100644
index 48b69f3227..0000000000
--- a/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 <typename, typename T = void>
- struct enabler { typedef T type; };
-}}}
-
-#endif
-
diff --git a/boost/fusion/support/detail/is_same_size.hpp b/boost/fusion/support/detail/is_same_size.hpp
new file mode 100644
index 0000000000..b1bf7cde41
--- /dev/null
+++ b/boost/fusion/support/detail/is_same_size.hpp
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2014-2015 Kohei Takahashi
+
+ Distributed under 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_IS_SAME_SIZE_10082015_1156
+#define FUSION_IS_SAME_SIZE_10082015_1156
+
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence1, typename Sequence2, typename = void, typename = void>
+ struct is_same_size : mpl::false_ {};
+
+ template <typename Sequence1, typename Sequence2>
+ struct is_same_size<Sequence1, Sequence2,
+ typename enable_if<traits::is_sequence<Sequence1> >::type,
+ typename enable_if<traits::is_sequence<Sequence2> >::type>
+ : mpl::equal_to<result_of::size<Sequence1>, result_of::size<Sequence2> >
+ {};
+}}}
+
+#endif
diff --git a/boost/fusion/support/detail/result_of.hpp b/boost/fusion/support/detail/result_of.hpp
deleted file mode 100644
index e53ea9e354..0000000000
--- a/boost/fusion/support/detail/result_of.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2014 Joel de Guzman
-
- Distributed under 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)
-==============================================================================*/
-#if !defined(FUSION_RESULT_OF_10272014_0654)
-#define FUSION_RESULT_OF_10272014_0654
-
-#include <boost/config.hpp>
-#include <boost/utility/result_of.hpp>
-
-#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#define BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF
-#endif
-
-#if !defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF)
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#endif
-
-namespace boost { namespace fusion { namespace detail
-{
- // This is a temporary workaround for result_of before we make fusion fully
- // sfinae result_of friendy, which will require some heavy lifting for some
- // low level code. So far this is used only in the fold algorithm. This will
- // be removed once we overhaul fold.
-
-#if defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF)
-
- template <typename Sig>
- struct result_of_with_decltype : boost::tr1_result_of<Sig> {};
-
-#else // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF)
-
- BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
- BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result)
-
- template <typename Sig>
- struct result_of_with_decltype;
-
- template <typename F, typename... Args>
- struct result_of_with_decltype<F(Args...)>
- : mpl::if_<mpl::or_<has_result_type<F>, detail::has_result<F> >,
- boost::tr1_result_of<F(Args...)>,
- boost::detail::cpp0x_result_of<F(Args...)> >::type {};
-
-#endif // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF)
-
-}}}
-
-#endif
diff --git a/boost/fusion/support/segmented_fold_until.hpp b/boost/fusion/support/segmented_fold_until.hpp
index 9e6f4a50f6..8fb09ee38d 100644
--- a/boost/fusion/support/segmented_fold_until.hpp
+++ b/boost/fusion/support/segmented_fold_until.hpp
@@ -11,11 +11,6 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/fusion/support/detail/segmented_fold_until_impl.hpp>
-#include <boost/fusion/view/iterator_range.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/end.hpp>
-#include <boost/fusion/sequence/intrinsic/empty.hpp>
-#include <boost/fusion/container/list/cons.hpp>
namespace boost { namespace fusion
{