x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
void_ptr_iterator.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\ptr_container\detail\void_ptr_iterator.hpp
旋转
特效
属性
历史版本
// // Boost.Pointer Container // // Copyright Thorsten Ottosen 2003-2005. Use, modification and // distribution is subject to 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) // // For more information, see http://www.boost.org/libs/ptr_container/ // #ifndef BOOST_PTR_CONTAINER_DETAIL_VOID_PTR_ITERATOR_HPP #define BOOST_PTR_CONTAINER_DETAIL_VOID_PTR_ITERATOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include
#include
#include
namespace boost { template < class VoidIter, class T > class void_ptr_iterator { public: typedef BOOST_DEDUCED_TYPENAME boost::remove_const
::type value_type; typedef T& reference; typedef T* pointer; typedef BOOST_DEDUCED_TYPENAME iterator_difference
::type difference_type; typedef BOOST_DEDUCED_TYPENAME iterator_category
::type iterator_category; private: VoidIter iter_; public: void_ptr_iterator() : iter_() { } void_ptr_iterator( VoidIter r ) : iter_(r) { } // // Remark: passing by value breaks vc7.1 // template< class MutableIterator, class MutableT > void_ptr_iterator( const void_ptr_iterator
& r ) #ifdef BOOST_NO_SFINAE : iter_( VoidIter(const_cast
(&*r.base())) ) #else : iter_(r.base()) #endif { } T& operator*() const { return *static_cast
( *iter_ ); } T* operator->() const { return static_cast
( *iter_ ); } void_ptr_iterator& operator++() { ++iter_; return *this; } void_ptr_iterator operator++(int) { void_ptr_iterator res = *this; ++iter_; return res; } void_ptr_iterator& operator--() { --iter_; return *this; } void_ptr_iterator operator--(int) { void_ptr_iterator res = *this; --iter_; return res; } void_ptr_iterator& operator+=( difference_type n ) { iter_ += n; return *this; } void_ptr_iterator& operator-=( difference_type n ) { iter_ -= n; return *this; } T& operator[]( difference_type n ) const { return *static_cast
( *(iter_ + n) ); } VoidIter base() const { return iter_; } }; // class 'void_ptr_iterator' template< class VoidIter, class T > inline void_ptr_iterator
operator+( void_ptr_iterator
l, BOOST_DEDUCED_TYPENAME void_ptr_iterator
::difference_type n ) { l += n; return l; } template< class VoidIter, class T > inline void_ptr_iterator
operator+( BOOST_DEDUCED_TYPENAME void_ptr_iterator
::difference_type n, void_ptr_iterator
r ) { r += n; return r; } template< class VoidIter, class T > inline void_ptr_iterator
operator-( void_ptr_iterator
l, BOOST_DEDUCED_TYPENAME void_ptr_iterator
::difference_type n ) { l -= n; return l; } template< class VoidIter, class T > inline void_ptr_iterator
operator-( BOOST_DEDUCED_TYPENAME void_ptr_iterator
::difference_type n, void_ptr_iterator
r ) { r -= n; return r; } template< class VoidIter, class T, class VoidIterU, class U > inline BOOST_DEDUCED_TYPENAME void_ptr_iterator
::difference_type operator-( void_ptr_iterator
l, void_ptr_iterator
r ) { return l.base() - r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator==( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() == r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator!=( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() != r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator<( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() < r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator<=( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() <= r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator>( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() > r.base(); } template< class VoidIterT, class T, class VoidIterU, class U > inline bool operator>=( const void_ptr_iterator
& l, const void_ptr_iterator
& r ) { return l.base() >= r.base(); } } #endif
void_ptr_iterator.hpp
网页地址
文件地址
上一页
13/13 下一页
下载
( 6 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.