Chris@16: //----------------------------------------------------------------------------- Chris@16: // boost variant/detail/move.hpp header file Chris@16: // See http://www.boost.org for updates, documentation, and revision history. Chris@16: //----------------------------------------------------------------------------- Chris@16: // Chris@16: // Copyright (c) 2002-2003 Eric Friedman Chris@16: // Copyright (c) 2002 by Andrei Alexandrescu Chris@101: // Copyright (c) 2013-2014 Antony Polukhin Chris@16: // Chris@16: // Use, modification and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // This file derivative of MoJO. Much thanks to Andrei for his initial work. Chris@16: // See for information on MOJO. Chris@16: // Re-issued here under the Boost Software License, with permission of the original Chris@16: // author (Andrei Alexandrescu). Chris@16: Chris@16: Chris@16: #ifndef BOOST_VARIANT_DETAIL_MOVE_HPP Chris@16: #define BOOST_VARIANT_DETAIL_MOVE_HPP Chris@16: Chris@16: #include // for iterator_traits Chris@16: #include // for placement new Chris@16: Chris@16: #include "boost/config.hpp" Chris@16: #include "boost/detail/workaround.hpp" Chris@16: #include "boost/move/move.hpp" Chris@101: #include "boost/move/adl_move_swap.hpp" Chris@16: Chris@101: namespace boost { namespace detail { namespace variant { Chris@16: Chris@16: using boost::move; Chris@16: Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: // function template move_swap Chris@16: // Chris@16: // Swaps using Koenig lookup but falls back to move-swap for primitive Chris@16: // types and on non-conforming compilers. Chris@16: // Chris@16: Chris@16: template Chris@16: inline void move_swap(T& lhs, T& rhs) Chris@16: { Chris@101: ::boost::adl_move_swap(lhs, rhs); Chris@16: } Chris@16: Chris@101: }}} // namespace boost::detail::variant Chris@16: Chris@16: #endif // BOOST_VARIANT_DETAIL_MOVE_HPP Chris@16: Chris@16: Chris@16: