Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:35:14

0001 // Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
0002 //
0003 // Distributed under the Boost Software License, Version 1.0. (See
0004 // accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 // For more information, see http://www.boost.org
0007 
0008 
0009 #ifndef BOOST_CORE_SWAP_HPP
0010 #define BOOST_CORE_SWAP_HPP
0011 
0012 // Note: the implementation of this utility contains various workarounds:
0013 // - boost::swap has two template arguments, instead of one, to
0014 // avoid ambiguity when swapping objects of a Boost type that does
0015 // not have its own boost::swap overload.
0016 
0017 #include <boost/core/enable_if.hpp>
0018 #include <boost/config.hpp>
0019 #include <boost/config/header_deprecated.hpp>
0020 #include <boost/core/invoke_swap.hpp>
0021 
0022 #ifdef BOOST_HAS_PRAGMA_ONCE
0023 #pragma once
0024 #endif
0025 
0026 BOOST_HEADER_DEPRECATED("boost/core/invoke_swap.hpp")
0027 
0028 namespace boost
0029 {
0030   template<class T1, class T2>
0031   BOOST_GPU_ENABLED
0032   BOOST_DEPRECATED("This function is deprecated, use boost::core::invoke_swap instead.")
0033   inline typename enable_if_c< !boost_swap_impl::is_const<T1>::value && !boost_swap_impl::is_const<T2>::value >::type
0034   swap(T1& left, T2& right)
0035   {
0036     boost::core::invoke_swap(left, right);
0037   }
0038 }
0039 
0040 #endif // BOOST_CORE_SWAP_HPP