std::move_iterator<Iter>::operator++,+,+=,--,-,-=
来自 zh.cppreference.net
move_iterator& operator++();
|
(1) | (自 C++17 起 constexpr) |
move_iterator& operator--();
|
(2) | (自 C++17 起 constexpr) |
move_iterator operator++( int );
|
(3) | (自 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)
*this4) 副本
*this 在更改前制作的5)
move_iterator(base() + n);6)
move_iterator(base() - n);7,8)
*this示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++11)
|
前移迭代器
(函数模板) |
|
(C++11)
|
计算两个迭代器适配器间的距离
(函数模板) |