##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::move_iterator::operator++,+,+=,--,-,-=

From cppreference.com
< cpp‎ | iterator‎ | move iterator

[edit template]

move_iterator& operator++(); | (1) |
move_iterator& operator--(); | (2) |
move_iterator operator++( int ); | (3) |
move_iterator operator--( int ); | (4) |
move_iterator operator+( difference_type n ) const; | (5) |
move_iterator operator-( difference_type n ) const; | (6) |
move_iterator& operator+=( difference_type n ) const; | (7) |
move_iterator& operator-=( difference_type n ) const; | (8) |

Increments or decrements the iterator.

1-2) Pre-increments or pre-decrements by one respectively.
3-4) Post-increments or post-decrements by one respectively.
5-6) Returns an iterator which is advanced by `n` or `-n` positions respectively.
7-8) Advances the iterator by `n` or `-n` positions respectively.

### [edit] Return value

1) *this
2) a copy of *this that was made before the change
3) move_iterator(base()+n) or move_iterator(base()-n) respectively.
4) *this

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

operator+ | advances the iterator (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/iterator/move_iterator/operator_arith&oldid=50882"
Category:

- Todo no example