std::move_iterator<Iter>::operator++,+,+=,--,-,-=
From cppreference.com
< cpp | iterator | move iterator
C++
Iterator library
| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::move_iterator
| Member functions | ||||
move_iterator::operator++move_iterator::operator+move_iterator::operator+=move_iterator::operator--move_iterator::operator-move_iterator::operator-= | ||||
| Non-member functions | ||||
(until C++20)(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++11) |
move_iterator& operator++(); |
(1) | (constexpr since C++17) |
move_iterator& operator--(); |
(2) | (constexpr since C++17) |
| (3) | ||
move_iterator operator++( int ); |
(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.
| Overload | Equivalent to | ||||
|---|---|---|---|---|---|
| (1) | ++current ; return *this;
| ||||
| (2) | --current ; return *this;
| ||||
| (3) |
| ||||
| (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;
|
Contents |
[edit] Parameters
| n | - | position relative to current location |
[edit] Return value
As described above.
[edit] Example
| This section is incomplete Reason: no example |
[edit] See also
| (C++11) |
advances the iterator (function template) [edit] |
| (C++11) |
computes the distance between two iterator adaptors (function template) [edit] |