epoc32/include/stdapis/boost/ptr_container/detail/move.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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.)
     4 
     5 // Contains the definitions of the class template move_source and the function
     6 // template move, which together make move pointers moveable.
     7 
     8 #ifndef BOOST_MOVE_HPP_INCLUDED
     9 #define BOOST_MOVE_HPP_INCLUDED
    10 
    11 namespace boost { namespace ptr_container_detail {
    12 
    13 namespace move_ptrs {
    14 
    15 template<typename Ptr>
    16 class move_source {
    17 public:
    18     move_source(Ptr& ptr) : ptr_(ptr) {}
    19     Ptr& ptr() const { return ptr_; }
    20 private:
    21     Ptr& ptr_;
    22     move_source(const Ptr&);
    23 };
    24 
    25 } // End namespace move_ptrs.
    26 
    27 
    28 template<typename T>
    29 move_ptrs::move_source<T> move(T& x) 
    30 { return move_ptrs::move_source<T>(x); }
    31 
    32 } // namespace 'ptr_container_detail'
    33 } // End namespace boost.
    34 
    35 #endif // #ifndef BOOST_MOVE_HPP_INCLUDED