x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
move_iterator.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\interprocess\detail\move_iterator.hpp
旋转
特效
属性
历史版本
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_INTERPROCESS_MOVE_ITERATOR_HPP_INCLUDED #define BOOST_INTERPROCESS_MOVE_ITERATOR_HPP_INCLUDED #include
#include
namespace boost{ namespace interprocess{ namespace detail{ template
class move_iterator { public: typedef It iterator_type; typedef typename std::iterator_traits
::value_type value_type; #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE typedef typename move_type
::type reference; #else typedef value_type && reference; #endif typedef typename std::iterator_traits
::pointer pointer; typedef typename std::iterator_traits
::difference_type difference_type; typedef typename std::iterator_traits
::iterator_category iterator_category; move_iterator() {} explicit move_iterator(It i) : m_it(i) {} template
move_iterator(const move_iterator
& u) : m_it(u.base()) {} const iterator_type &base() const { return m_it; } iterator_type &base() { return m_it; } reference operator*() const #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE { return move(*m_it); } #else { return *m_it; } #endif pointer operator->() const { return m_it; } move_iterator& operator++() { ++m_it; return *this; } move_iterator
operator++(int) { move_iterator
tmp(*this); ++(*this); return tmp; } move_iterator& operator--() { --m_it; return *this; } move_iterator
operator--(int) { move_iterator
tmp(*this); --(*this); return tmp; } move_iterator
operator+ (difference_type n) const { return move_iterator
(m_it + n); } move_iterator& operator+=(difference_type n) { m_it += n; return *this; } move_iterator
operator- (difference_type n) const { return move_iterator
(m_it - n); } move_iterator& operator-=(difference_type n) { m_it -= n; return *this; } reference operator[](difference_type n) const { return move(m_it[n]); } private: It m_it; }; template
inline bool operator==(const move_iterator
& x, const move_iterator
& y) { return x.base() == y.base(); } template
inline bool operator!=(const move_iterator
& x, const move_iterator
& y) { return x.base() != y.base(); } template
inline bool operator< (const move_iterator
& x, const move_iterator
& y) { return x.base() < y.base(); } template
inline bool operator<=(const move_iterator
& x, const move_iterator
& y) { return x.base() <= y.base(); } template
inline bool operator> (const move_iterator
& x, const move_iterator
& y) { return x.base() > y.base(); } template
inline bool operator>=(const move_iterator
& x, const move_iterator
& y) { return x.base() >= y.base(); } template
inline typename move_iterator
::difference_type operator-(const move_iterator
& x, const move_iterator
& y) { return x.base() - y.base(); } template
inline move_iterator
operator+(typename move_iterator
::difference_type n ,const move_iterator
& x) { return move_iterator
(x.base() + n); } template
move_iterator
make_move_iterator(const It &it) { return move_iterator
(it); } } //namespace detail{ } //namespace interprocess{ } //namespace boost{ #endif //#ifndef BOOST_INTERPROCESS_MOVE_ITERATOR_HPP_INCLUDED
move_iterator.hpp
网页地址
文件地址
上一页
15/29
下一页
下载
( 4 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.