Last change
on this file since 12 was
12,
checked in by landauf, 18 years ago
|
added boost
|
-
Property svn:executable set to
*
|
File size:
901 bytes
|
Line | |
---|
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 |
---|
Note: See
TracBrowser
for help on using the repository browser.