File indexing completed on 2025-01-18 09:30:24
0001
0002
0003
0004
0005
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