| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Non-member functions | ||||
(until C++20)(C++20) | ||||
(C++20) | ||||
operator+ | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++11) |
Defined in header <iterator> | ||
template<class Iter> move_iterator<Iter> operator+ | (since C++11) (constexpr since C++17) (until C++20) | |
template<class Iter> constexpr move_iterator<Iter> operator+ | (since C++20) | |
Returns the iteratorit incremented byn.
This overload participates in overload resolution only ifit.base()+ n is well-formed and has type | (since C++20) |
Contents |
| n | - | the number of positions to increment the iterator |
| it | - | the iterator adaptor to increment |
it+ n
| This section is incomplete Reason: no example |
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3293 | C++20 | the non-memberoperator+ was constrained to requireit+ n is well-formed and has type Iter | changed to it.base()+ n |
advances or decrements themove_iterator(public member function)[edit] | |
(C++11) | computes the distance between two iterator adaptors (function template)[edit] |