This concept specifies requirements on types that can be incremented with the pre- and post-increment operators, whose increment operations areequality-preserving, and the type isstd::equality_comparable.
Unlike withstd::weakly_incrementable, which only support single-pass algorithms, multi-pass one-directional algorithms can be used with types that modelstd::incrementable
.
[edit]Semantic requirements
I
modelsstd::incrementable
only if given any two incrementable objectsa
andb
of typeI
:
- bool(a== b) impliesbool(a++== b), and
- bool(a== b) impliesbool(((void)a++, a)==++b).
[edit]Equality preservation
Expressions declared inrequires expressions of the standard library concepts are required to beequality-preserving (except where stated otherwise).
[edit]See also
| specifies that asemiregular type can be incremented with pre- and post-increment operators (concept)[edit] |
| specifies that a type is the same as another type (concept)[edit] |