diff DEPENDENCIES/generic/include/boost/fusion/sequence/intrinsic/swap.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/fusion/sequence/intrinsic/swap.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/fusion/sequence/intrinsic/swap.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -8,24 +8,27 @@
 #if !defined(BOOST_FUSION_SWAP_20070501_1956)
 #define BOOST_FUSION_SWAP_20070501_1956
 
+#include <boost/fusion/support/config.hpp>
 #include <algorithm>
 
 #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
@@ -39,6 +42,7 @@
             };
 
             template<typename Elem>
+            BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
             void operator()(Elem const& e) const
             {
                 using std::swap;
@@ -48,7 +52,8 @@
     }
 
     template<typename Seq1, typename Seq2>
-    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;