Chris@16: // (C) Copyright Daniel Wallin 2004. Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) Chris@16: Chris@16: // Contains the definitions of the class template move_source and the function Chris@16: // template move, which together make move pointers moveable. Chris@16: Chris@16: #ifndef BOOST_MOVE_HPP_INCLUDED Chris@16: #define BOOST_MOVE_HPP_INCLUDED Chris@16: Chris@16: namespace boost { namespace ptr_container_detail { Chris@16: Chris@16: namespace move_ptrs { Chris@16: Chris@16: #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) Chris@16: #pragma warning(push) Chris@16: #pragma warning(disable:4512) Chris@16: #endif Chris@16: Chris@16: template Chris@16: class move_source { Chris@16: public: Chris@16: move_source(Ptr& ptr) : ptr_(ptr) {} Chris@16: Ptr& ptr() const { return ptr_; } Chris@16: private: Chris@16: Ptr& ptr_; Chris@16: move_source(const Ptr&); Chris@16: }; Chris@16: Chris@16: #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) Chris@16: #pragma warning(pop) Chris@16: #endif Chris@16: Chris@16: } // End namespace move_ptrs. Chris@16: Chris@16: Chris@16: template Chris@16: move_ptrs::move_source move(T& x) Chris@16: { return move_ptrs::move_source(x); } Chris@16: Chris@16: } // namespace 'ptr_container_detail' Chris@16: } // End namespace boost. Chris@16: Chris@16: #endif // #ifndef BOOST_MOVE_HPP_INCLUDED