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

来自cppreference.com
 
 
迭代器库
迭代器概念
迭代器原语
算法概念与工具
间接可调用概念
常用算法要求
(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)
 
 
move_iterator& operator++();
(1) (C++17 起为 constexpr)
move_iterator& operator--();
(2) (C++17 起为 constexpr)
(3)
move_iterator operator++( int );
(C++17 起为 constexpr)
(C++20 前)
constexpr auto operator++( int );
(C++20 起)
move_iterator operator--( int );
(4) (C++17 起为 constexpr)
move_iterator operator+( difference_type n ) const;
(5) (C++17 起为 constexpr)
move_iterator operator-( difference_type n ) const;
(6) (C++17 起为 constexpr)
move_iterator& operator+=( difference_type n );
(7) (C++17 起为 constexpr)
move_iterator& operator-=( difference_type n );
(8) (C++17 起为 constexpr)

递增或递减底层迭代器。

1,3) 递增底层迭代器。
2,4) 递减底层迭代器。
5) 返回一个前进 n 个位置的迭代器。
6) 返回一个前进 -n 个位置的迭代器。
7) 将迭代器前进 n 个位置。
8) 将迭代器前进 -n 个位置。

参数

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

返回值

1,2) *this
3) 在更改之前制作的 *this 的副本。如果 Iter 不满足 forward_iterator,则不返回任何内容(C++20 起)
4) 在更改之前制作的 *this 的副本
5) move_iterator(base() + n);
6) move_iterator(base() - n);
7,8) *this

示例

参阅

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