From 7b3cbf3d37020fec5a25c50df4e94d65de9ba7c0 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 27 May 2015 18:13:52 -0300 Subject: [PATCH 1/9] Add some missing serialization #includes --- hpx/components/iostreams/server/output_stream.hpp | 3 ++- hpx/runtime/agas/component_namespace.hpp | 1 + hpx/runtime/agas/locality_namespace.hpp | 1 + hpx/runtime/agas/primary_namespace.hpp | 1 + hpx/runtime/agas/server/component_namespace.hpp | 1 + hpx/runtime/agas/server/locality_namespace.hpp | 1 + hpx/runtime/agas/server/primary_namespace.hpp | 1 + hpx/runtime/agas/server/symbol_namespace.hpp | 1 + hpx/runtime/agas/symbol_namespace.hpp | 1 + hpx/runtime/parcelset/locality.hpp | 1 + 10 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hpx/components/iostreams/server/output_stream.hpp b/hpx/components/iostreams/server/output_stream.hpp index b0d117efcc57..32db2b351824 100644 --- a/hpx/components/iostreams/server/output_stream.hpp +++ b/hpx/components/iostreams/server/output_stream.hpp @@ -8,8 +8,9 @@ #define HPX_4AFE0EEA_49F8_4F4C_8945_7B55BF395DA0 #include -#include #include +#include +#include #include #include diff --git a/hpx/runtime/agas/component_namespace.hpp b/hpx/runtime/agas/component_namespace.hpp index b9edeed57649..950f3734840b 100644 --- a/hpx/runtime/agas/component_namespace.hpp +++ b/hpx/runtime/agas/component_namespace.hpp @@ -10,6 +10,7 @@ #include #include +#include namespace hpx { namespace agas { diff --git a/hpx/runtime/agas/locality_namespace.hpp b/hpx/runtime/agas/locality_namespace.hpp index 41c004bfc127..2131dc5d28d1 100644 --- a/hpx/runtime/agas/locality_namespace.hpp +++ b/hpx/runtime/agas/locality_namespace.hpp @@ -11,6 +11,7 @@ #include #include +#include namespace hpx { namespace agas { diff --git a/hpx/runtime/agas/primary_namespace.hpp b/hpx/runtime/agas/primary_namespace.hpp index ae350517cdfe..457b1e0b3db4 100644 --- a/hpx/runtime/agas/primary_namespace.hpp +++ b/hpx/runtime/agas/primary_namespace.hpp @@ -10,6 +10,7 @@ #include #include +#include namespace hpx { namespace agas { diff --git a/hpx/runtime/agas/server/component_namespace.hpp b/hpx/runtime/agas/server/component_namespace.hpp index b513f5a421fa..f9e7505648d3 100644 --- a/hpx/runtime/agas/server/component_namespace.hpp +++ b/hpx/runtime/agas/server/component_namespace.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/hpx/runtime/agas/server/locality_namespace.hpp b/hpx/runtime/agas/server/locality_namespace.hpp index e60d433505ce..efa914c5fb85 100644 --- a/hpx/runtime/agas/server/locality_namespace.hpp +++ b/hpx/runtime/agas/server/locality_namespace.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/hpx/runtime/agas/server/primary_namespace.hpp b/hpx/runtime/agas/server/primary_namespace.hpp index ff7d87926a22..05cc2e2aafbb 100644 --- a/hpx/runtime/agas/server/primary_namespace.hpp +++ b/hpx/runtime/agas/server/primary_namespace.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/hpx/runtime/agas/server/symbol_namespace.hpp b/hpx/runtime/agas/server/symbol_namespace.hpp index 5e5395e949a1..9b244bd0dcd0 100644 --- a/hpx/runtime/agas/server/symbol_namespace.hpp +++ b/hpx/runtime/agas/server/symbol_namespace.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/hpx/runtime/agas/symbol_namespace.hpp b/hpx/runtime/agas/symbol_namespace.hpp index 6649209b6c40..40e0368fc280 100644 --- a/hpx/runtime/agas/symbol_namespace.hpp +++ b/hpx/runtime/agas/symbol_namespace.hpp @@ -10,6 +10,7 @@ #include #include +#include namespace hpx { namespace agas { diff --git a/hpx/runtime/parcelset/locality.hpp b/hpx/runtime/parcelset/locality.hpp index 59a8e1fb12f3..a253362e42ff 100644 --- a/hpx/runtime/parcelset/locality.hpp +++ b/hpx/runtime/parcelset/locality.hpp @@ -12,6 +12,7 @@ #include #include +#include #include #include From 1c43e938716f8ccc39b2bc1f8723e68883d4a73e Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 27 May 2015 18:13:59 -0300 Subject: [PATCH 2/9] Remove tuple dependency on serialize_sequence Reimplement tuple serialization support as a pack expansion. Minimize dependencies on runtime/serialization. --- hpx/runtime/actions/transfer_action.hpp | 5 ++-- hpx/util/tuple.hpp | 37 ++++++++++++------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/hpx/runtime/actions/transfer_action.hpp b/hpx/runtime/actions/transfer_action.hpp index b3f2472a6bc4..200da296a63a 100644 --- a/hpx/runtime/actions/transfer_action.hpp +++ b/hpx/runtime/actions/transfer_action.hpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -382,7 +381,7 @@ namespace hpx { namespace actions // loading ... void serialize(hpx::serialization::input_archive & ar) { - serialization::serialize_sequence(ar, arguments_); + ar >> arguments_; // Always serialize the parent information to maintain binary // compatibility on the wire. @@ -402,7 +401,7 @@ namespace hpx { namespace actions // saving ... void serialize(hpx::serialization::output_archive & ar) { - serialization::serialize_sequence(ar, arguments_); + ar << arguments_; // Always serialize the parent information to maintain binary // compatibility on the wire. diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index a41e14c76f02..1d6c631f94c4 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -1,6 +1,6 @@ // Copyright (c) 2011-2013 Thomas Heller // Copyright (c) 2011-2013 Hartmut Kaiser -// Copyright (c) 2013 Agustin Berge +// Copyright (c) 2013-2015 Agustin Berge // // 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) @@ -9,8 +9,6 @@ #define HPX_UTIL_TUPLE_HPP #include -#include -#include #include #include #include @@ -266,6 +264,15 @@ namespace hpx { namespace util I, typename detail::at_index::type > const&>(*this).value(); } + + template + void serialize(Archive& ar, unsigned int const version) + { + int const _sequencer[] = { + ((ar & this->get()), 0)... + }; + (void)_sequencer; + } }; /////////////////////////////////////////////////////////////////////// @@ -940,34 +947,26 @@ namespace hpx { namespace traits {}; }} -namespace hpx { namespace serialization { - +namespace hpx { namespace serialization +{ /////////////////////////////////////////////////////////////////////////// template BOOST_FORCEINLINE void serialize( Archive& ar , ::hpx::util::tuple& t - , unsigned int const version + , unsigned int const version = 0 ) { - ::hpx::serialization::serialize_sequence(ar, t); + t._impl.serialize(ar, version); } - // These are needed to avoid conflicts with serialize_empty_type + template BOOST_FORCEINLINE void serialize( - serialization::output_archive& - , ::hpx::util::tuple<>& - , unsigned int const - ) - {} - - BOOST_FORCEINLINE - void serialize( - serialization::input_archive& - , ::hpx::util::tuple<>& - , unsigned int const + Archive& ar + , ::hpx::util::tuple<>& t + , unsigned int const version = 0 ) {} }} From ed52f4bd692f46dcf2662cd8df24d0bc25eaa4f7 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 27 May 2015 18:41:04 -0300 Subject: [PATCH 3/9] Reduce tuple dependency on fusion --- hpx/util/detail/fusion_adapt_tuple.hpp | 321 ++++++++++++++++--------- 1 file changed, 204 insertions(+), 117 deletions(-) diff --git a/hpx/util/detail/fusion_adapt_tuple.hpp b/hpx/util/detail/fusion_adapt_tuple.hpp index 1f41d36e6be5..baac134c9d52 100644 --- a/hpx/util/detail/fusion_adapt_tuple.hpp +++ b/hpx/util/detail/fusion_adapt_tuple.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001-2011 Joel de Guzman -// Copyright (c) 2013 Agustin Berge +// Copyright (c) 2013-2015 Agustin Berge // // 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) @@ -10,9 +10,6 @@ #include #include -#include -#include - /////////////////////////////////////////////////////////////////////////////// /// tag_of.hpp #include @@ -29,11 +26,9 @@ namespace boost { namespace fusion namespace traits { template - struct tag_of< - hpx::util::tuple - > + struct tag_of< ::hpx::util::tuple, void> { - typedef hpx::util::detail::tuple_tag type; + typedef ::hpx::util::detail::tuple_tag type; }; } }} @@ -44,17 +39,13 @@ namespace boost { namespace mpl struct sequence_tag; template - struct sequence_tag - > + struct sequence_tag< ::hpx::util::tuple > { typedef fusion::fusion_sequence_tag type; }; template - struct sequence_tag const - > + struct sequence_tag< ::hpx::util::tuple const> { typedef fusion::fusion_sequence_tag type; }; @@ -62,21 +53,21 @@ namespace boost { namespace mpl /////////////////////////////////////////////////////////////////////////////// /// is_sequence_impl.hpp -#include +#include namespace boost { namespace fusion { namespace extension { - template + template struct is_sequence_impl; - template<> - struct is_sequence_impl + template <> + struct is_sequence_impl< ::hpx::util::detail::tuple_tag> { - template + template struct apply - : mpl::true_ + : boost::true_type {}; }; } @@ -84,21 +75,21 @@ namespace boost { namespace fusion /////////////////////////////////////////////////////////////////////////////// /// is_view_impl.hpp -#include +#include namespace boost { namespace fusion { namespace extension { - template + template struct is_view_impl; - template<> - struct is_view_impl + template <> + struct is_view_impl< ::hpx::util::detail::tuple_tag> { - template + template struct apply - : mpl::false_ + : boost::false_type {}; }; } @@ -113,13 +104,13 @@ namespace boost { namespace fusion namespace extension { - template + template struct category_of_impl; - template<> - struct category_of_impl + template <> + struct category_of_impl< ::hpx::util::detail::tuple_tag> { - template + template struct apply { typedef random_access_traversal_tag type; @@ -129,99 +120,190 @@ namespace boost { namespace fusion }} /////////////////////////////////////////////////////////////////////////////// -/// hpx_tuple_iterator.hpp -#include -#include +/// tuple_iterator.hpp +#include +#include + +#include +#include + +namespace hpx { namespace util { namespace detail +{ + struct tuple_iterator_tag; + + template + struct tuple_iterator + { + typedef Tuple tuple_type; + static std::size_t const index = Index; + typedef tuple_iterator identity; + + explicit tuple_iterator(Tuple& tuple) + : tuple_(tuple) + {} + + Tuple& tuple_; + }; + + template + typename tuple_element::type& + operator*(tuple_iterator i) + { + return util::get(i.tuple_); + } +}}} namespace boost { namespace fusion { - struct random_access_traversal_tag; + namespace traits + { + template + struct tag_of< ::hpx::util::detail::tuple_iterator, void> + { + typedef ::hpx::util::detail::tuple_iterator_tag type; + }; + } - template - struct hpx_tuple_iterator_identity; + struct random_access_traversal_tag; - template - struct hpx_tuple_iterator - : iterator_facade< - hpx_tuple_iterator - , random_access_traversal_tag - > + namespace extension { - typedef Tuple tuple_type; - static int const index = Index; - typedef hpx_tuple_iterator_identity< - typename add_const::type, Index> - identity; - - explicit hpx_tuple_iterator(Tuple& tuple_) - : tuple(tuple_) {} - - Tuple& tuple; - - template - struct value_of - : hpx::util::tuple_element< - Iterator::index - , typename Iterator::tuple_type - > - {}; - - template - struct deref + template + struct category_of_impl; + + template <> + struct category_of_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply + { + typedef random_access_traversal_tag type; + }; + }; + + template + struct value_of_impl; + + template <> + struct value_of_impl< ::hpx::util::detail::tuple_iterator_tag> { - typedef typename - hpx::util::tuple_element< + template + struct apply + : ::hpx::util::tuple_element< Iterator::index , typename Iterator::tuple_type - >::type - element; - typedef element& type; + > + {}; + }; + + template + struct deref_impl; - static type call(Iterator const& iter) + template <> + struct deref_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply { - return hpx::util::get(iter.tuple); - } + static int const index = Iterator::index; + typedef typename + ::hpx::util::tuple_element< + Iterator::index + , typename Iterator::tuple_type + >::type + element; + typedef element& type; + + static type call(Iterator const& iter) + { + return ::hpx::util::get(iter.tuple_); + } + }; }; - template - struct advance - { - static int const index = Iterator::index; - typedef typename Iterator::tuple_type tuple_type; - typedef hpx_tuple_iterator type; + template + struct advance_impl; - static type call(Iterator const& i) + template <> + struct advance_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply { - return type(i.tuple); - } + static int const index = Iterator::index; + typedef typename Iterator::tuple_type tuple_type; + typedef ::hpx::util::detail::tuple_iterator< + tuple_type, index + I::value> type; + + static type call(Iterator const& i) + { + return type(i.tuple_); + } + }; }; - template - struct next - : advance > - {}; + template + struct next_impl; - template - struct prior - : advance > - {}; + template <> + struct next_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply + : advance_impl< ::hpx::util::detail::tuple_iterator_tag>:: + template apply > + {}; + }; - template - struct equal_to - : is_same - {}; + template + struct prior_impl; - template - struct distance + template <> + struct prior_impl< ::hpx::util::detail::tuple_iterator_tag> { - typedef mpl::int_ type; + template + struct apply + : advance_impl< ::hpx::util::detail::tuple_iterator_tag>:: + template apply > + {}; + }; + + template + struct equal_to_impl; + + template <> + struct equal_to_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply + : boost::integral_constant< + bool, + std::is_same::value + > + {}; + }; - static type call(First const&, Last const&) + template + struct distance_impl; + + template <> + struct distance_impl< ::hpx::util::detail::tuple_iterator_tag> + { + template + struct apply { - return type(); - } + typedef boost::integral_constant< + int, + Last::index - First::index + > type; + + static type call(First const&, Last const&) + { + return type(); + } + }; }; - }; + } }} /////////////////////////////////////////////////////////////////////////////// @@ -231,23 +313,23 @@ namespace boost { namespace fusion { namespace extension { - template + template struct at_impl; template <> - struct at_impl + struct at_impl< ::hpx::util::detail::tuple_tag> { template struct apply { typedef typename - hpx::util::tuple_element::type + ::hpx::util::tuple_element::type element; typedef element& type; static type call(Sequence& seq) { - return hpx::util::get(seq); + return ::hpx::util::get(seq); } }; }; @@ -261,16 +343,16 @@ namespace boost { namespace fusion { namespace extension { - template + template struct begin_impl; template <> - struct begin_impl + struct begin_impl< ::hpx::util::detail::tuple_tag> { template struct apply { - typedef hpx_tuple_iterator type; + typedef ::hpx::util::detail::tuple_iterator type; static type call(Sequence& v) { @@ -288,17 +370,17 @@ namespace boost { namespace fusion { namespace extension { - template + template struct end_impl; template <> - struct end_impl + struct end_impl< ::hpx::util::detail::tuple_tag> { template struct apply { - static int const size = hpx::util::tuple_size::value; - typedef hpx_tuple_iterator type; + static int const size = ::hpx::util::tuple_size::value; + typedef ::hpx::util::detail::tuple_iterator type; static type call(Sequence& v) { @@ -311,21 +393,26 @@ namespace boost { namespace fusion /////////////////////////////////////////////////////////////////////////////// /// size_impl.hpp -#include +#include + +#include namespace boost { namespace fusion { namespace extension { - template + template struct size_impl; template <> - struct size_impl + struct size_impl< ::hpx::util::detail::tuple_tag> { template struct apply - : mpl::int_::value> + : boost::integral_constant< + std::size_t, + ::hpx::util::tuple_size::value + > {}; }; } @@ -337,15 +424,15 @@ namespace boost { namespace fusion { namespace extension { - template + template struct value_at_impl; template <> - struct value_at_impl + struct value_at_impl< ::hpx::util::detail::tuple_tag> { template struct apply - : hpx::util::tuple_element + : ::hpx::util::tuple_element {}; }; } From 7dd7b91a1e698d45e893149a60487898eddfb18d Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 27 May 2015 21:09:14 -0300 Subject: [PATCH 4/9] Remove tuple dependency on qualify_as --- hpx/util/tuple.hpp | 61 +++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index 1d6c631f94c4..9c466a9ddae8 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -680,11 +679,11 @@ namespace hpx { namespace util : boost::mpl::size_t {}; - template + template struct tuple_cat_size_impl< - Size, detail::pack + Size, detail::pack > : tuple_cat_size_impl< - (Size + tuple_size::value), detail::pack + (Size + tuple_size::value), detail::pack > {}; @@ -697,51 +696,57 @@ namespace hpx { namespace util template struct tuple_cat_element; - template + template struct tuple_cat_element< - I, detail::pack + I, detail::pack , typename boost::enable_if_c< - (I < tuple_size::value) + (I < tuple_size::value) >::type - > : tuple_element + > : tuple_element { - typedef tuple_element base_type; + typedef tuple_element base_type; - template static BOOST_CONSTEXPR BOOST_FORCEINLINE - typename detail::qualify_as< - typename base_type::type - , HeadTuple_& - >::type - get(HeadTuple_& head, TailTuples_& ...tail) BOOST_NOEXCEPT + typename base_type::type& + get(Head& head, Tail& ...tail) BOOST_NOEXCEPT + { + return base_type::get(head); + } + + static BOOST_CONSTEXPR BOOST_FORCEINLINE + typename base_type::type const& + get(Head const& head, Tail& ...tail) BOOST_NOEXCEPT { return base_type::get(head); } }; - template + template struct tuple_cat_element< - I, detail::pack + I, detail::pack , typename boost::enable_if_c< - (I >= tuple_size::value) + (I >= tuple_size::value) >::type > : tuple_cat_element< - I - tuple_size::value - , detail::pack + I - tuple_size::value + , detail::pack > { typedef tuple_cat_element< - I - tuple_size::value - , detail::pack + I - tuple_size::value + , detail::pack > base_type; - template static BOOST_CONSTEXPR BOOST_FORCEINLINE - typename detail::qualify_as< - typename base_type::type - , HeadTuple_& - >::type - get(HeadTuple_& head, TailTuples_& ...tail) BOOST_NOEXCEPT + typename base_type::type& + get(Head& head, Tail& ...tail) BOOST_NOEXCEPT + { + return base_type::get(tail...); + } + + static BOOST_CONSTEXPR BOOST_FORCEINLINE + typename base_type::type const& + get(Head const& head, Tail& ...tail) BOOST_NOEXCEPT { return base_type::get(tail...); } From 5cfc3d2067cb1e34b07478dae5ad802815e69057 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 27 May 2015 21:12:03 -0300 Subject: [PATCH 5/9] Remove tuple dependency on boost::swap --- hpx/util/tuple.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index 9c466a9ddae8..2a2b89f5103a 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -24,7 +24,6 @@ #include #include #include -#include #include // for size_t #include @@ -240,8 +239,9 @@ namespace hpx { namespace util void swap(tuple_impl& other) { + using std::swap; int const _sequencer[] = { - ((boost::swap(this->get(), other.template get())), 0)... + ((swap(this->get(), other.template get())), 0)... }; (void)_sequencer; } From 27c5dcf3e420567751c0fd3e8ee9c87afca5ba26 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Thu, 28 May 2015 12:58:11 -0300 Subject: [PATCH 6/9] Reduce tuple dependency on boost.type_traits --- hpx/util/tuple.hpp | 93 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index 2a2b89f5103a..bccb4b37d902 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -11,23 +11,16 @@ #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include // for size_t +#include #include -#include #if defined(BOOST_MSVC) #pragma warning(push) @@ -93,7 +86,12 @@ namespace hpx { namespace util template struct tuple_member::value>::type + typename std::enable_if< + std::is_empty::value +#if defined(HPX_HAVE_CXX11_STD_IS_FINAL) + && !std::is_final::value +#endif + >::type > : T { public: @@ -135,11 +133,10 @@ namespace hpx { namespace util static bool const value = sizeof( - call(util::get(boost::declval())...) + call(util::get(std::declval())...) ) == sizeof(yes_type); typedef boost::mpl::bool_ type; - type m_; }; template @@ -150,9 +147,9 @@ namespace hpx { namespace util template struct are_tuples_compatible< tuple, UTuple - , typename boost::enable_if_c< + , typename std::enable_if< tuple_size< - typename boost::remove_reference::type + typename std::remove_reference::type >::value == detail::pack::size >::type > : are_tuples_compatible_impl< @@ -163,9 +160,9 @@ namespace hpx { namespace util template struct are_tuples_compatible_not_same - : boost::mpl::if_c< - boost::is_same< - typename decay::type, typename decay::type + : std::conditional< + std::is_same< + typename std::decay::type, typename std::decay::type >::value , boost::mpl::false_ , are_tuples_compatible @@ -186,7 +183,7 @@ namespace hpx { namespace util {} template ::size == detail::pack::size >::type> explicit BOOST_CONSTEXPR tuple_impl(Us&&... vs) @@ -202,7 +199,7 @@ namespace hpx { namespace util {} template , UTuple&&>::value >::type> BOOST_CONSTEXPR tuple_impl(UTuple&& other) @@ -364,16 +361,15 @@ namespace hpx { namespace util // unless each type in UTypes is implicitly convertible to its // corresponding type in Types. template ::size == detail::pack::size - && boost::mpl::eval_if_c< + && std::conditional< detail::pack::size == 0 - , boost::mpl::eval_if_c< - boost::is_same::type>::value - || detail::are_tuples_compatible_not_same::value - , boost::mpl::false_ + , typename std::enable_if< + !std::is_same::type>::value + && !detail::are_tuples_compatible_not_same::value , detail::are_tuples_compatible&&> - > + >::type , detail::are_tuples_compatible&&> >::type::value >::type> @@ -403,7 +399,7 @@ namespace hpx { namespace util // unless each type in UTypes is implicitly convertible to its // corresponding type in Types template ::value >::type> BOOST_CONSTEXPR tuple(UTuple&& other) @@ -432,8 +428,10 @@ namespace hpx { namespace util // template tuple& operator=(tuple&& u); // For all i, assigns get(std::forward(u)) to get(*this). template - typename boost::enable_if_c< - tuple_size::type>::value == detail::pack::size + typename std::enable_if< + tuple_size< + typename std::decay::type + >::value == detail::pack::size , tuple& >::type operator=(UTuple&& other) { @@ -477,17 +475,17 @@ namespace hpx { namespace util template struct tuple_size > - : boost::mpl::size_t + : boost::integral_constant {}; template struct tuple_size > - : boost::mpl::size_t<2> + : boost::integral_constant {}; template struct tuple_size > - : boost::mpl::size_t + : boost::integral_constant {}; // template @@ -498,17 +496,17 @@ namespace hpx { namespace util template struct tuple_element - : boost::add_const::type> + : std::add_const::type> {}; template struct tuple_element - : boost::add_volatile::type> + : std::add_volatile::type> {}; template struct tuple_element - : boost::add_cv::type> + : std::add_cv::type> {}; template @@ -590,7 +588,7 @@ namespace hpx { namespace util template struct tuple_decay > { - typedef tuple::type...> type; + typedef tuple::type...> type; }; // 20.4.2.6, element access @@ -676,8 +674,9 @@ namespace hpx { namespace util template struct tuple_cat_size_impl > - : boost::mpl::size_t - {}; + { + static const std::size_t value = Size; + }; template struct tuple_cat_size_impl< @@ -699,7 +698,7 @@ namespace hpx { namespace util template struct tuple_cat_element< I, detail::pack - , typename boost::enable_if_c< + , typename std::enable_if< (I < tuple_size::value) >::type > : tuple_element @@ -724,7 +723,7 @@ namespace hpx { namespace util template struct tuple_cat_element< I, detail::pack - , typename boost::enable_if_c< + , typename std::enable_if< (I >= tuple_size::value) >::type > : tuple_cat_element< @@ -829,7 +828,7 @@ namespace hpx { namespace util template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator==(tuple const& t, tuple const& u) { return detail::tuple_equal_to<0, sizeof...(Ts)>::call(t, u); @@ -840,7 +839,7 @@ namespace hpx { namespace util // (const tuple& t, const tuple& u); template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator!=(tuple const& t, tuple const& u) { return !(t == u); @@ -885,7 +884,7 @@ namespace hpx { namespace util template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator<(tuple const& t, tuple const& u) { return detail::tuple_less_than<0, sizeof...(Ts)>::call(t, u); @@ -896,7 +895,7 @@ namespace hpx { namespace util // (const tuple& t, const tuple& u); template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator>(tuple const& t, tuple const& u) { return u < t; @@ -907,7 +906,7 @@ namespace hpx { namespace util // (const tuple& t, const tuple& u); template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator<=(tuple const& t, tuple const& u) { return !(u < t); @@ -918,7 +917,7 @@ namespace hpx { namespace util // (const tuple& t, const tuple& u); template BOOST_CONSTEXPR BOOST_FORCEINLINE - typename boost::enable_if_c::type + typename std::enable_if::type operator>=(tuple const& t, tuple const& u) { return !(t < u); From 3ca717834084e9c48dc53dde6bb5ef3dea5f0547 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Wed, 3 Jun 2015 21:18:49 -0300 Subject: [PATCH 7/9] Removed unused tuple_decay (introduced to aid with faux variadics) --- hpx/util/tuple.hpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index bccb4b37d902..6a81355d69f3 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -581,16 +581,6 @@ namespace hpx { namespace util } }; - template - struct tuple_decay - {}; - - template - struct tuple_decay > - { - typedef tuple::type...> type; - }; - // 20.4.2.6, element access // template From d17b5cda7e499b07b71081759ad438a1e2dae196 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Fri, 21 Aug 2015 12:08:13 -0300 Subject: [PATCH 8/9] Remove tuple dependency on boost.mpl --- hpx/util/tuple.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hpx/util/tuple.hpp b/hpx/util/tuple.hpp index 6a81355d69f3..fca0d7c3a18b 100644 --- a/hpx/util/tuple.hpp +++ b/hpx/util/tuple.hpp @@ -14,7 +14,6 @@ #include #include -#include #include #include @@ -136,12 +135,12 @@ namespace hpx { namespace util call(util::get(std::declval())...) ) == sizeof(yes_type); - typedef boost::mpl::bool_ type; + typedef std::integral_constant type; }; template struct are_tuples_compatible - : boost::mpl::false_ + : std::false_type {}; template @@ -164,7 +163,7 @@ namespace hpx { namespace util std::is_same< typename std::decay::type, typename std::decay::type >::value - , boost::mpl::false_ + , std::false_type , are_tuples_compatible >::type {}; From bf86884f35ab8b6a5527c0ec39484537be517fc1 Mon Sep 17 00:00:00 2001 From: K-ballo Date: Sat, 29 Aug 2015 15:00:58 -0300 Subject: [PATCH 9/9] Add a few more missing serialization #includes --- .../serialization/detail/polymorphic_intrusive_factory.hpp | 1 + hpx/util/detail/function_registration.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/hpx/runtime/serialization/detail/polymorphic_intrusive_factory.hpp b/hpx/runtime/serialization/detail/polymorphic_intrusive_factory.hpp index 0fae7a52fb1d..665fffa9d3fb 100644 --- a/hpx/runtime/serialization/detail/polymorphic_intrusive_factory.hpp +++ b/hpx/runtime/serialization/detail/polymorphic_intrusive_factory.hpp @@ -8,6 +8,7 @@ #ifndef HPX_SERIALIZATION_POLYMORPHIC_INTRUSIVE_FACTORY_HPP #define HPX_SERIALIZATION_POLYMORPHIC_INTRUSIVE_FACTORY_HPP +#include #include #include diff --git a/hpx/util/detail/function_registration.hpp b/hpx/util/detail/function_registration.hpp index f6fcb46bd1c9..73528385b2c1 100644 --- a/hpx/util/detail/function_registration.hpp +++ b/hpx/util/detail/function_registration.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include