public member function
<iterator>
(1) | move_iterator& operator--();
|
---|
(2) | move_iterator operator--(int); |
---|
Decrease iterator position
Decreases the iterator by one position.
Internally, the pre-decrement version (1) simply reflects the operation into its base iterator .
The post-decrement version (2) is implemented with a behavior equivalent to:
1 2 3 4 5
|
move_iterator operator--(int) {
move_iterator temp = *this;
--(*this);
return temp;
}
| |
Note that this function requires the base iterator to be at least a bidirectional iterator.
Parameters
none (the second version overloads the post-decrement operator).
Return value
The pre-decrement version (1) returns *this
.
The post-decrement version (2) returns the value *this
had before the call.
Data races
Modifies the object.
The iterator returned can be used to access or modify pointed elements.
Exception safety
Provides the same level of guarantee as decreasing (and copying, for (2)) the base iterator.