diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/fusion/sequence/intrinsic/swap.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/fusion/sequence/intrinsic/swap.hpp')
-rw-r--r-- | boost/fusion/sequence/intrinsic/swap.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/boost/fusion/sequence/intrinsic/swap.hpp b/boost/fusion/sequence/intrinsic/swap.hpp index 05ce9b44b1..8c49dc4896 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; |