Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:24

0001 
0002 //          Copyright Oliver Kowalke 2014.
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //    (See accompanying file LICENSE_1_0.txt or copy at
0005 //          http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_CONTEXT_DETAIL_EXCHANGE_H
0008 #define BOOST_CONTEXT_DETAIL_EXCHANGE_H
0009 
0010 #include <algorithm>
0011 #include <utility>
0012 
0013 #include <boost/config.hpp>
0014 
0015 #ifdef BOOST_HAS_ABI_HEADERS
0016 # include BOOST_ABI_PREFIX
0017 #endif
0018 
0019 namespace boost {
0020 namespace context {
0021 namespace detail {
0022 
0023 template< typename T, typename U = T >
0024 T exchange( T & t, U && nv) {
0025     T ov = std::move( t);
0026     t = std::forward< U >( nv);
0027     return ov;
0028 }
0029 
0030 }}}
0031 
0032 #ifdef BOOST_HAS_ABI_HEADERS
0033 #include BOOST_ABI_SUFFIX
0034 #endif
0035 
0036 #endif // BOOST_CONTEXT_DETAIL_EXCHANGE_H