std::move_iterator<Iter>::operator++,+,+=,--,-,-=
move_iterator& operator++(); | (1) | (constexpr since C++17) |
move_iterator& operator--(); | (2) | (constexpr since C++17) |
move_iterator operator++( int ); | (3) |
(constexpr since C++17) (until C++20) |
constexpr auto operator++( int ); | (since C++20) | |
move_iterator operator--( int ); | (4) | (constexpr since C++17) |
move_iterator operator+( difference_type n ) const; | (5) | (constexpr since C++17) |
move_iterator operator-( difference_type n ) const; | (6) | (constexpr since C++17) |
move_iterator& operator+=( difference_type n ); | (7) | (constexpr since C++17) |
move_iterator& operator-=( difference_type n ); | (8) | (constexpr since C++17) |
Increments or decrements the underlying iterator.
1,3) Increments the underlying iterator.
2,4) Decrements the underlying iterator.
5) Returns an iterator which is advanced by
n positions.
6) Returns an iterator which is advanced by
-n positions.
7) Advanced the iterator by
n positions.
8) Advanced the iterator by
-n positions.Parameters
| n | - | position relative to current location |
Return value
1,2)
*this
3) A copy of
*this made before the change. If Iter does not model forward_iterator, returns nothing(since C++20)
4) A copy of
*this made before the change
5)
move_iterator(base() + n);
6)
move_iterator(base() - n);
7,8)
*this
Example
See also
|
(C++11) | advances the iterator (function template) |
|
(C++11) | computes the distance between two iterator adaptors (function template) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/iterator/move_iterator/operator_arith