summaryrefslogtreecommitdiff
path: root/boost/fusion/sequence
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/sequence')
-rw-r--r--boost/fusion/sequence/comparison/detail/equal_to.hpp8
-rw-r--r--boost/fusion/sequence/comparison/detail/greater.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/greater_equal.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/less.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/less_equal.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/not_equal_to.hpp8
-rw-r--r--boost/fusion/sequence/comparison/equal_to.hpp4
-rw-r--r--boost/fusion/sequence/comparison/greater.hpp4
-rw-r--r--boost/fusion/sequence/comparison/greater_equal.hpp4
-rw-r--r--boost/fusion/sequence/comparison/less.hpp4
-rw-r--r--boost/fusion/sequence/comparison/less_equal.hpp10
-rw-r--r--boost/fusion/sequence/comparison/not_equal_to.hpp4
-rw-r--r--boost/fusion/sequence/convert.hpp6
-rw-r--r--boost/fusion/sequence/hash.hpp42
-rw-r--r--boost/fusion/sequence/intrinsic.hpp1
-rw-r--r--boost/fusion/sequence/intrinsic/at.hpp26
-rw-r--r--boost/fusion/sequence/intrinsic/at_key.hpp6
-rw-r--r--boost/fusion/sequence/intrinsic/back.hpp4
-rw-r--r--boost/fusion/sequence/intrinsic/begin.hpp8
-rw-r--r--boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp2
-rw-r--r--boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp6
-rw-r--r--boost/fusion/sequence/intrinsic/detail/segmented_end.hpp2
-rw-r--r--boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp13
-rw-r--r--boost/fusion/sequence/intrinsic/empty.hpp2
-rw-r--r--boost/fusion/sequence/intrinsic/end.hpp8
-rw-r--r--boost/fusion/sequence/intrinsic/front.hpp4
-rw-r--r--boost/fusion/sequence/intrinsic/has_key.hpp2
-rw-r--r--boost/fusion/sequence/intrinsic/segments.hpp4
-rw-r--r--boost/fusion/sequence/intrinsic/size.hpp18
-rw-r--r--boost/fusion/sequence/intrinsic/swap.hpp16
-rw-r--r--boost/fusion/sequence/intrinsic_fwd.hpp38
-rw-r--r--boost/fusion/sequence/io/detail/manip.hpp6
32 files changed, 175 insertions, 109 deletions
diff --git a/boost/fusion/sequence/comparison/detail/equal_to.hpp b/boost/fusion/sequence/comparison/detail/equal_to.hpp
index 577023d..cffed6c 100644
--- a/boost/fusion/sequence/comparison/detail/equal_to.hpp
+++ b/boost/fusion/sequence/comparison/detail/equal_to.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -41,7 +41,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
@@ -54,7 +54,7 @@ namespace boost { namespace fusion { namespace detail
struct sequence_equal_to<Seq1, Seq2, false>
{
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& /*a*/, I2 const& /*b*/)
{
diff --git a/boost/fusion/sequence/comparison/detail/greater.hpp b/boost/fusion/sequence/comparison/detail/greater.hpp
index d875f16..d762652 100644
--- a/boost/fusion/sequence/comparison/detail/greater.hpp
+++ b/boost/fusion/sequence/comparison/detail/greater.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -42,7 +42,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
diff --git a/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/boost/fusion/sequence/comparison/detail/greater_equal.hpp
index e0aa530..d15d88c 100644
--- a/boost/fusion/sequence/comparison/detail/greater_equal.hpp
+++ b/boost/fusion/sequence/comparison/detail/greater_equal.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -42,7 +42,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
diff --git a/boost/fusion/sequence/comparison/detail/less.hpp b/boost/fusion/sequence/comparison/detail/less.hpp
index 8964ca7..04377d6 100644
--- a/boost/fusion/sequence/comparison/detail/less.hpp
+++ b/boost/fusion/sequence/comparison/detail/less.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -42,7 +42,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
diff --git a/boost/fusion/sequence/comparison/detail/less_equal.hpp b/boost/fusion/sequence/comparison/detail/less_equal.hpp
index 10bcb76..e61d33c 100644
--- a/boost/fusion/sequence/comparison/detail/less_equal.hpp
+++ b/boost/fusion/sequence/comparison/detail/less_equal.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -42,7 +42,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
diff --git a/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
index b230ac1..323b2ac 100644
--- a/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
+++ b/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const&, I2 const&, mpl::true_)
{
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
@@ -41,7 +41,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
@@ -54,7 +54,7 @@ namespace boost { namespace fusion { namespace detail
struct sequence_not_equal_to<Seq1, Seq2, false>
{
template <typename I1, typename I2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool
call(I1 const& a, I2 const& b)
{
diff --git a/boost/fusion/sequence/comparison/equal_to.hpp b/boost/fusion/sequence/comparison/equal_to.hpp
index 485df0b..283ffef 100644
--- a/boost/fusion/sequence/comparison/equal_to.hpp
+++ b/boost/fusion/sequence/comparison/equal_to.hpp
@@ -24,7 +24,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
equal_to(Seq1 const& a, Seq2 const& b)
{
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
namespace operators
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_equality<Seq1, Seq2>
diff --git a/boost/fusion/sequence/comparison/greater.hpp b/boost/fusion/sequence/comparison/greater.hpp
index 5ad7ef7..fbbb7bf 100644
--- a/boost/fusion/sequence/comparison/greater.hpp
+++ b/boost/fusion/sequence/comparison/greater.hpp
@@ -23,7 +23,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
greater(Seq1 const& a, Seq2 const& b)
{
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
namespace operators
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_comparison<Seq1, Seq2>
diff --git a/boost/fusion/sequence/comparison/greater_equal.hpp b/boost/fusion/sequence/comparison/greater_equal.hpp
index 65904f8..7b91a88 100644
--- a/boost/fusion/sequence/comparison/greater_equal.hpp
+++ b/boost/fusion/sequence/comparison/greater_equal.hpp
@@ -23,7 +23,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
greater_equal(Seq1 const& a, Seq2 const& b)
{
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
namespace operators
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_comparison<Seq1, Seq2>
diff --git a/boost/fusion/sequence/comparison/less.hpp b/boost/fusion/sequence/comparison/less.hpp
index 28762b7..b056552 100644
--- a/boost/fusion/sequence/comparison/less.hpp
+++ b/boost/fusion/sequence/comparison/less.hpp
@@ -18,7 +18,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
less(Seq1 const& a, Seq2 const& b)
{
@@ -29,7 +29,7 @@ namespace boost { namespace fusion
namespace operators
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_comparison<Seq1, Seq2>
diff --git a/boost/fusion/sequence/comparison/less_equal.hpp b/boost/fusion/sequence/comparison/less_equal.hpp
index d066820..5315992 100644
--- a/boost/fusion/sequence/comparison/less_equal.hpp
+++ b/boost/fusion/sequence/comparison/less_equal.hpp
@@ -24,7 +24,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
less_equal(Seq1 const& a, Seq2 const& b)
{
@@ -41,7 +41,7 @@ namespace boost { namespace fusion
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400)
// Workaround for VC8.0 and VC7.1
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
operator<=(sequence_base<Seq1> const& a, sequence_base<Seq2> const& b)
{
@@ -49,7 +49,7 @@ namespace boost { namespace fusion
}
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename disable_if<traits::is_native_fusion_sequence<Seq2>, bool>::type
operator<=(sequence_base<Seq1> const& a, Seq2 const& b)
{
@@ -57,7 +57,7 @@ namespace boost { namespace fusion
}
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename disable_if<traits::is_native_fusion_sequence<Seq1>, bool>::type
operator<=(Seq1 const& a, sequence_base<Seq2> const& b)
{
@@ -69,7 +69,7 @@ namespace boost { namespace fusion
// but barfs somewhere else.
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_comparison<Seq1, Seq2>
diff --git a/boost/fusion/sequence/comparison/not_equal_to.hpp b/boost/fusion/sequence/comparison/not_equal_to.hpp
index 4cd94f9..fc2fef3 100644
--- a/boost/fusion/sequence/comparison/not_equal_to.hpp
+++ b/boost/fusion/sequence/comparison/not_equal_to.hpp
@@ -23,7 +23,7 @@
namespace boost { namespace fusion
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
not_equal_to(Seq1 const& a, Seq2 const& b)
{
@@ -41,7 +41,7 @@ namespace boost { namespace fusion
namespace operators
{
template <typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
boost::enable_if<
traits::enable_equality<Seq1, Seq2>
diff --git a/boost/fusion/sequence/convert.hpp b/boost/fusion/sequence/convert.hpp
index 461b921..b367714 100644
--- a/boost/fusion/sequence/convert.hpp
+++ b/boost/fusion/sequence/convert.hpp
@@ -7,6 +7,8 @@
#if !defined(FUSION_CONVERT_10022005_1442)
#define FUSION_CONVERT_10022005_1442
+#include <boost/fusion/support/config.hpp>
+
namespace boost { namespace fusion
{
namespace extension
@@ -29,7 +31,7 @@ namespace boost { namespace fusion
}
template <typename Tag, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::convert<Tag, Sequence>::type
convert(Sequence& seq)
{
@@ -38,7 +40,7 @@ namespace boost { namespace fusion
}
template <typename Tag, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::convert<Tag, Sequence const>::type
convert(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/hash.hpp b/boost/fusion/sequence/hash.hpp
new file mode 100644
index 0000000..bc5b149
--- /dev/null
+++ b/boost/fusion/sequence/hash.hpp
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2014 Christoph Weiss
+
+ 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_HASH_23072014_1017)
+#define FUSION_HASH_23072014_1017
+
+#include <boost/functional/hash.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace hashing
+ {
+ struct hash_combine_fold
+ {
+ typedef std::size_t result_type;
+ template<typename T>
+ inline std::size_t operator()(std::size_t seed, T const& v)
+ {
+ boost::hash_combine(seed, v);
+ return seed;
+ }
+ };
+
+ template <typename Seq>
+ inline typename
+ boost::enable_if<traits::is_sequence<Seq>, std::size_t>::type
+ hash_value(Seq const& seq)
+ {
+ return fold(seq, 0, hash_combine_fold());
+ }
+ }
+
+ using hashing::hash_value;
+}}
+
+#endif
diff --git a/boost/fusion/sequence/intrinsic.hpp b/boost/fusion/sequence/intrinsic.hpp
index 4583807..d3e5af0 100644
--- a/boost/fusion/sequence/intrinsic.hpp
+++ b/boost/fusion/sequence/intrinsic.hpp
@@ -20,5 +20,6 @@
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/swap.hpp>
#endif
diff --git a/boost/fusion/sequence/intrinsic/at.hpp b/boost/fusion/sequence/intrinsic/at.hpp
index aa0d974..fdfa72a 100644
--- a/boost/fusion/sequence/intrinsic/at.hpp
+++ b/boost/fusion/sequence/intrinsic/at.hpp
@@ -9,6 +9,9 @@
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/int.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/empty_base.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/fusion/sequence/intrinsic_fwd.hpp>
#include <boost/fusion/support/tag_of.hpp>
@@ -56,12 +59,23 @@ namespace boost { namespace fusion
struct at_impl<std_tuple_tag>;
}
+ namespace detail
+ {
+ template <typename Sequence, typename N, typename Tag>
+ struct at_impl
+ : mpl::if_<
+ mpl::less<N, typename extension::size_impl<Tag>::template apply<Sequence>::type>
+ , typename extension::at_impl<Tag>::template apply<Sequence, N>
+ , mpl::empty_base
+ >::type
+ {};
+ }
+
namespace result_of
{
template <typename Sequence, typename N>
struct at
- : extension::at_impl<typename detail::tag_of<Sequence>::type>::
- template apply<Sequence, N>
+ : detail::at_impl<Sequence, N, typename detail::tag_of<Sequence>::type>
{};
template <typename Sequence, int N>
@@ -72,7 +86,7 @@ namespace boost { namespace fusion
template <typename N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@@ -84,7 +98,7 @@ namespace boost { namespace fusion
}
template <typename N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::at<Sequence const, N>::type
at(Sequence const& seq)
{
@@ -92,7 +106,7 @@ namespace boost { namespace fusion
}
template <int N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@@ -104,7 +118,7 @@ namespace boost { namespace fusion
}
template <int N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::at_c<Sequence const, N>::type
at_c(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/intrinsic/at_key.hpp b/boost/fusion/sequence/intrinsic/at_key.hpp
index 844de84..4693a90 100644
--- a/boost/fusion/sequence/intrinsic/at_key.hpp
+++ b/boost/fusion/sequence/intrinsic/at_key.hpp
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
>::type
type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Seq& seq)
{
@@ -74,7 +74,7 @@ namespace boost { namespace fusion
}
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@@ -86,7 +86,7 @@ namespace boost { namespace fusion
}
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::at_key<Sequence const, Key>::type
at_key(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/intrinsic/back.hpp b/boost/fusion/sequence/intrinsic/back.hpp
index f934355..3f998a7 100644
--- a/boost/fusion/sequence/intrinsic/back.hpp
+++ b/boost/fusion/sequence/intrinsic/back.hpp
@@ -27,7 +27,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::back<Sequence>::type
back(Sequence& seq)
{
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::back<Sequence const>::type
back(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/intrinsic/begin.hpp b/boost/fusion/sequence/intrinsic/begin.hpp
index af4e312..79c14d7 100644
--- a/boost/fusion/sequence/intrinsic/begin.hpp
+++ b/boost/fusion/sequence/intrinsic/begin.hpp
@@ -8,8 +8,8 @@
#define FUSION_BEGIN_04052005_1132
#include <boost/fusion/support/config.hpp>
-#include <boost/blank.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/empty_base.hpp>
#include <boost/mpl/if.hpp>
#include <boost/fusion/sequence/intrinsic_fwd.hpp>
#include <boost/fusion/support/tag_of.hpp>
@@ -36,7 +36,7 @@ namespace boost { namespace fusion
: mpl::if_<
traits::is_segmented<Sequence>
, detail::segmented_begin<Sequence>
- , blank
+ , mpl::empty_base
>::type
{};
};
@@ -71,7 +71,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -83,7 +83,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
diff --git a/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
index 81d0966..ec20ac4 100644
--- a/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
+++ b/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq)
{
return type(
diff --git a/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp b/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
index 2ab4627..12d9e24 100644
--- a/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
+++ b/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
@@ -38,7 +38,7 @@ namespace boost { namespace fusion { namespace detail
typedef cons<range_type, Context> type;
typedef mpl::false_ continue_type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&, Context const& context, segmented_begin_fun)
{
return type(range_type(fusion::begin(seq), fusion::end(seq)), context);
@@ -64,7 +64,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename fold_impl::type type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, Stack const& stack)
{
return fold_impl::call(seq, end_impl::call(seq, stack), stack, segmented_begin_fun());
@@ -79,7 +79,7 @@ namespace boost { namespace fusion { namespace detail
typedef iterator_range<begin_type, end_type> pair_type;
typedef cons<pair_type, Stack> type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, Stack stack)
{
return type(pair_type(fusion::begin(seq), fusion::end(seq)), stack);
diff --git a/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
index c26865a..55419ed 100644
--- a/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
+++ b/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
@@ -28,7 +28,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence & seq)
{
return type(
diff --git a/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp b/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
index 9be1504..da48649 100644
--- a/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
+++ b/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
@@ -48,11 +48,18 @@ namespace boost { namespace fusion { namespace detail
typedef iterator_range<end_type, end_type> pair_type;
typedef cons<pair_type, Stack> type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ static pair_type make_pair(end_type end)
+ {
+ return pair_type(end, end);
+ }
+
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence & seq, Stack stack)
{
- end_type end = fusion::end(fusion::segments(seq));
- return type(pair_type(end, end), stack);
+ return type(
+ make_pair(fusion::end(fusion::segments(seq))),
+ stack);
}
};
diff --git a/boost/fusion/sequence/intrinsic/empty.hpp b/boost/fusion/sequence/intrinsic/empty.hpp
index 3c8666a..6a0dbe7 100644
--- a/boost/fusion/sequence/intrinsic/empty.hpp
+++ b/boost/fusion/sequence/intrinsic/empty.hpp
@@ -51,7 +51,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::empty<Sequence>::type
empty(Sequence const&)
{
diff --git a/boost/fusion/sequence/intrinsic/end.hpp b/boost/fusion/sequence/intrinsic/end.hpp
index 3e69518..b342468 100644
--- a/boost/fusion/sequence/intrinsic/end.hpp
+++ b/boost/fusion/sequence/intrinsic/end.hpp
@@ -8,8 +8,8 @@
#define FUSION_END_04052005_1141
#include <boost/fusion/support/config.hpp>
-#include <boost/blank.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/empty_base.hpp>
#include <boost/mpl/if.hpp>
#include <boost/fusion/sequence/intrinsic_fwd.hpp>
#include <boost/fusion/support/tag_of.hpp>
@@ -36,7 +36,7 @@ namespace boost { namespace fusion
: mpl::if_<
traits::is_segmented<Sequence>
, detail::segmented_end<Sequence>
- , blank
+ , mpl::empty_base
>::type
{};
};
@@ -71,7 +71,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -83,7 +83,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
diff --git a/boost/fusion/sequence/intrinsic/front.hpp b/boost/fusion/sequence/intrinsic/front.hpp
index 6d939da..8971298 100644
--- a/boost/fusion/sequence/intrinsic/front.hpp
+++ b/boost/fusion/sequence/intrinsic/front.hpp
@@ -26,7 +26,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::front<Sequence>::type
front(Sequence& seq)
{
@@ -34,7 +34,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::front<Sequence const>::type
front(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/intrinsic/has_key.hpp b/boost/fusion/sequence/intrinsic/has_key.hpp
index bba2c69..d69a82f 100644
--- a/boost/fusion/sequence/intrinsic/has_key.hpp
+++ b/boost/fusion/sequence/intrinsic/has_key.hpp
@@ -68,7 +68,7 @@ namespace boost { namespace fusion
}
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::has_key<Sequence, Key>::type
has_key(Sequence const&)
{
diff --git a/boost/fusion/sequence/intrinsic/segments.hpp b/boost/fusion/sequence/intrinsic/segments.hpp
index a1bbaca..41501a9 100644
--- a/boost/fusion/sequence/intrinsic/segments.hpp
+++ b/boost/fusion/sequence/intrinsic/segments.hpp
@@ -54,7 +54,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@@ -67,7 +67,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::segments<Sequence const>::type
segments(Sequence const& seq)
{
diff --git a/boost/fusion/sequence/intrinsic/size.hpp b/boost/fusion/sequence/intrinsic/size.hpp
index 51e613f..97aa3ef 100644
--- a/boost/fusion/sequence/intrinsic/size.hpp
+++ b/boost/fusion/sequence/intrinsic/size.hpp
@@ -49,10 +49,10 @@ namespace boost { namespace fusion
template <typename Sequence>
struct apply : Sequence::template size<Sequence> {};
};
-
+
template <>
struct size_impl<boost_tuple_tag>;
-
+
template <>
struct size_impl<boost_array_tag>;
@@ -67,18 +67,14 @@ namespace boost { namespace fusion
{
template <typename Sequence>
struct size
- : extension::size_impl<typename detail::tag_of<Sequence>::type>::
- template apply<Sequence>
-
- {
- typedef typename extension::size_impl<typename detail::tag_of<Sequence>::type>::
- template apply<Sequence>::type size_application;
- BOOST_STATIC_CONSTANT(int, value = size_application::value);
- };
+ : mpl::int_<
+ extension::size_impl<typename detail::tag_of<Sequence>::type>
+ ::template apply<Sequence>::type::value
+ > {};
}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::size<Sequence>::type
size(Sequence const&)
{
diff --git a/boost/fusion/sequence/intrinsic/swap.hpp b/boost/fusion/sequence/intrinsic/swap.hpp
index 05ce9b4..8c49dc4 100644
--- a/boost/fusion/sequence/intrinsic/swap.hpp
+++ b/boost/fusion/sequence/intrinsic/swap.hpp
@@ -14,19 +14,21 @@
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/view/zip_view.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
-#include <boost/utility/enable_if.hpp>
#include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/mpl/and.hpp>
namespace boost { namespace fusion {
+
namespace result_of
{
template<typename Seq1, typename Seq2>
struct swap
- {
- typedef void type;
- };
+ : enable_if<mpl::and_<
+ traits::is_sequence<Seq1>,
+ traits::is_sequence<Seq2>
+ > > {};
}
namespace detail
@@ -40,7 +42,7 @@ namespace boost { namespace fusion {
};
template<typename Elem>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
void operator()(Elem const& e) const
{
using std::swap;
@@ -50,8 +52,8 @@ namespace boost { namespace fusion {
}
template<typename Seq1, typename Seq2>
- BOOST_FUSION_GPU_ENABLED
- typename enable_if<mpl::and_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >, void>::type
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ inline typename result_of::swap<Seq1, Seq2>::type
swap(Seq1& lhs, Seq2& rhs)
{
typedef vector<Seq1&, Seq2&> references;
diff --git a/boost/fusion/sequence/intrinsic_fwd.hpp b/boost/fusion/sequence/intrinsic_fwd.hpp
index 3b248a0..a6354ea 100644
--- a/boost/fusion/sequence/intrinsic_fwd.hpp
+++ b/boost/fusion/sequence/intrinsic_fwd.hpp
@@ -93,7 +93,7 @@ namespace boost { namespace fusion
}
template <typename N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_disable_if<
is_const<Sequence>
@@ -102,12 +102,12 @@ namespace boost { namespace fusion
at(Sequence& seq);
template <typename N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::at<Sequence const, N>::type
at(Sequence const& seq);
template <int N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_disable_if<
is_const<Sequence>
@@ -116,22 +116,22 @@ namespace boost { namespace fusion
at_c(Sequence& seq);
template <int N, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::at_c<Sequence const, N>::type
at_c(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::back<Sequence>::type
back(Sequence& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::back<Sequence const>::type
back(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -140,7 +140,7 @@ namespace boost { namespace fusion
begin(Sequence& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -149,12 +149,12 @@ namespace boost { namespace fusion
begin(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::empty<Sequence>::type
empty(Sequence const&);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -163,7 +163,7 @@ namespace boost { namespace fusion
end(Sequence& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
@@ -172,22 +172,22 @@ namespace boost { namespace fusion
end(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::front<Sequence>::type
front(Sequence& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::front<Sequence const>::type
front(Sequence const& seq);
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::has_key<Sequence, Key>::type
has_key(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_disable_if<
is_const<Sequence>
@@ -196,17 +196,17 @@ namespace boost { namespace fusion
segments(Sequence& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::segments<Sequence const>::type
segments(Sequence const& seq);
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::size<Sequence>::type
size(Sequence const&);
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename
lazy_disable_if<
is_const<Sequence>
@@ -215,7 +215,7 @@ namespace boost { namespace fusion
at_key(Sequence& seq);
template <typename Key, typename Sequence>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::at_key<Sequence const, Key>::type
at_key(Sequence const& seq);
}}
diff --git a/boost/fusion/sequence/io/detail/manip.hpp b/boost/fusion/sequence/io/detail/manip.hpp
index 8d8c296..ec8ce30 100644
--- a/boost/fusion/sequence/io/detail/manip.hpp
+++ b/boost/fusion/sequence/io/detail/manip.hpp
@@ -235,14 +235,16 @@ namespace boost { namespace fusion
template <typename Stream, typename Char, typename Traits> \
Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m) \
{ \
- string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ string_ios_manip<name##_tag, Stream> manip(s); \
+ manip.set(m.data); \
return s; \
} \
\
template <typename Stream, typename Char, typename Traits> \
Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m) \
{ \
- string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ string_ios_manip<name##_tag, Stream> manip(s); \
+ manip.set(m.data); \
return s; \
} \
} \