1 // (C) Copyright Daniel Wallin 2004.
2 // Distributed under the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
5 // Contains the definitions of the class template move_source and the function
6 // template move, which together make move pointers moveable.
8 #ifndef BOOST_MOVE_HPP_INCLUDED
9 #define BOOST_MOVE_HPP_INCLUDED
11 namespace boost { namespace ptr_container_detail {
15 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
17 #pragma warning(disable:4512)
20 template<typename Ptr>
23 move_source(Ptr& ptr) : ptr_(ptr) {}
24 Ptr& ptr() const { return ptr_; }
27 move_source(const Ptr&);
30 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
34 } // End namespace move_ptrs.
38 move_ptrs::move_source<T> move(T& x)
39 { return move_ptrs::move_source<T>(x); }
41 } // namespace 'ptr_container_detail'
42 } // End namespace boost.
44 #endif // #ifndef BOOST_MOVE_HPP_INCLUDED