1 //-----------------------------------------------------------------------------
2 // boost variant/detail/move.hpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
6 // Copyright (c) 2002-2003 Eric Friedman
7 // Copyright (c) 2002 by Andrei Alexandrescu
8 // Copyright (c) 2013-2014 Antony Polukhin
10 // Use, modification and distribution are subject to the
11 // Boost Software License, Version 1.0. (See accompanying file
12 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
14 // This file derivative of MoJO. Much thanks to Andrei for his initial work.
15 // See <http://www.cuj.com/experts/2102/alexandr.htm> for information on MOJO.
16 // Re-issued here under the Boost Software License, with permission of the original
17 // author (Andrei Alexandrescu).
20 #ifndef BOOST_VARIANT_DETAIL_MOVE_HPP
21 #define BOOST_VARIANT_DETAIL_MOVE_HPP
23 #include <iterator> // for iterator_traits
24 #include <new> // for placement new
26 #include <boost/config.hpp>
27 #include <boost/detail/workaround.hpp>
28 #include <boost/move/move.hpp>
29 #include <boost/move/adl_move_swap.hpp>
31 namespace boost { namespace detail { namespace variant {
35 //////////////////////////////////////////////////////////////////////////
36 // function template move_swap
38 // Swaps using Koenig lookup but falls back to move-swap for primitive
39 // types and on non-conforming compilers.
43 inline void move_swap(T& lhs, T& rhs)
45 ::boost::adl_move_swap(lhs, rhs);
48 }}} // namespace boost::detail::variant
50 #endif // BOOST_VARIANT_DETAIL_MOVE_HPP