/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden 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(BOOST_FUSION_SWAP_20070501_1956) #define BOOST_FUSION_SWAP_20070501_1956 #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { namespace result_of { template struct swap { typedef void type; }; } namespace detail { struct swap { template struct result { typedef void type; }; template BOOST_FUSION_GPU_ENABLED void operator()(Elem const& e) const { using std::swap; swap(front(e), back(e)); } }; } template BOOST_FUSION_GPU_ENABLED typename enable_if, traits::is_sequence >, void>::type swap(Seq1& lhs, Seq2& rhs) { typedef vector references; for_each(zip_view(references(lhs, rhs)), detail::swap()); } }} #endif