Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:34

0001 // (C) Copyright Daniel Wallin 2004.
0002 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0003 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
0004 
0005 // Contains the definitions of the class template move_source and the function
0006 // template move, which together make move pointers moveable.
0007 
0008 #ifndef BOOST_MOVE_HPP_INCLUDED
0009 #define BOOST_MOVE_HPP_INCLUDED
0010 
0011 namespace boost { namespace ptr_container_detail {
0012 
0013 namespace move_ptrs {
0014 
0015 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
0016 #pragma warning(push)
0017 #pragma warning(disable:4512)
0018 #endif
0019 
0020 template<typename Ptr>
0021 class move_source {
0022 public:
0023     move_source(Ptr& ptr) : ptr_(ptr) {}
0024     Ptr& ptr() const { return ptr_; }
0025 private:
0026     Ptr& ptr_;
0027     move_source(const Ptr&);
0028 };
0029 
0030 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
0031 #pragma warning(pop)
0032 #endif
0033 
0034 } // End namespace move_ptrs.
0035 
0036 
0037 template<typename T>
0038 move_ptrs::move_source<T> move(T& x)
0039 { return move_ptrs::move_source<T>(x); }
0040 
0041 } // namespace 'ptr_container_detail'
0042 } // End namespace boost.
0043 
0044 #endif // #ifndef BOOST_MOVE_HPP_INCLUDED