std::move_iterator<Iter>::operator++,+,+=,--,-,-= - cppreference.com
来自cppreference.com
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 个位置。
参数
返回值
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