命名空间
变体
操作

std::move_iterator<Iter>::operator++,+,+=,--,-,-=

来自 cppreference.cn
 
 
迭代器库
迭代器概念
迭代器原语
算法概念和工具
间接可调用概念
常用算法要求
(C++20)
(C++20)
(C++20)
工具
(C++20)
迭代器适配器
范围访问
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
std::move_iterator
成员函数
move_iterator::operator++move_iterator::operator+move_iterator::operator+=move_iterator::operator--move_iterator::operator-move_iterator::operator-=
非成员函数
(C++20)
(C++20)
 
move_iterator& operator++();
(1) (constexpr 从 C++17 起)
move_iterator& operator--();
(2) (constexpr 从 C++17 起)
(3)
move_iterator operator++( int );
(constexpr 从 C++17 起)
(直到 C++20)
constexpr auto operator++( int );
(从 C++20 起)
move_iterator operator--( int );
(4) (constexpr 从 C++17 起)
move_iterator operator+( difference_type n ) const;
(5) (constexpr 从 C++17 起)
move_iterator operator-( difference_type n ) const;
(6) (constexpr 从 C++17 起)
move_iterator& operator+=( difference_type n );
(7) (constexpr 从 C++17 起)
move_iterator& operator-=( difference_type n );
(8) (constexpr 从 C++17 起)

递增或递减底层迭代器。

 重载  等价于
(1) ++current ; return *this;
(2) --current ; return *this;
(3)

move_iterator tmp = *this; ++current ; return tmp;

(直到 C++20)
(从 C++20 起)
(4) move_iterator tmp = *this; --current ; return tmp;
(5) return move_iterator(current + n);
(6) return move_iterator(current - n);
(7) current += n; return *this;
(8) current -= n; return *this;

目录

[编辑] 参数

n - 相对于当前位置的位置

[编辑] 返回值

如上所述。

[编辑] 示例

[编辑] 参见

(C++11)
推进迭代器
(函数模板) [编辑]
(C++11)
计算两个迭代器适配器之间的距离
(函数模板) [编辑]