[iterator.concept.inc]

# 24 Iterators library [[iterators]](./#iterators)

## 24.3 Iterator requirements [[iterator.requirements]](iterator.requirements#iterator.concept.inc)

### 24.3.4 Iterator concepts [[iterator.concepts]](iterator.concepts#iterator.concept.inc)

#### 24.3.4.5 Concept incrementable [iterator.concept.inc]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L1583)

The [incrementable](#concept:incrementable "24.3.4.5 Concept incrementable [iterator.concept.inc]") concept specifies requirements on types that can be incremented with the pre-
and post-increment operators[.](#1.sentence-1)

The increment operations are required to be equality-preserving,
and the type is required to be [equality_comparable](concept.equalitycomparable#concept:equality_comparable "18.5.4 Concept equality_­comparable [concept.equalitycomparable]")[.](#1.sentence-2)

[*Note [1](#note-1)*:

This supersedes the annotations on the increment expressions
in the definition of [weakly_incrementable](iterator.concept.winc#concept:weakly_incrementable "24.3.4.4 Concept weakly_­incrementable [iterator.concept.winc]")[.](#1.sentence-3)

â *end note*]

template<class I>concept [incrementable](#concept:incrementable "24.3.4.5 Concept incrementable [iterator.concept.inc]") =[regular](concepts.object#concept:regular "18.6 Object concepts [concepts.object]")<I> &&[weakly_incrementable](iterator.concept.winc#concept:weakly_incrementable "24.3.4.4 Concept weakly_­incrementable [iterator.concept.winc]")<I> &&requires(I i) {{ i++ } -> [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]")<I>; };

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L1602)

Let a and b be incrementable objects of type I[.](#2.sentence-1)

I models [incrementable](#concept:incrementable "24.3.4.5 Concept incrementable [iterator.concept.inc]") only if:

- [(2.1)](#2.1)

  If bool(a == b) then bool(a++ == b)[.](#2.1.sentence-1)

- [(2.2)](#2.2)

  If bool(a == b) then bool(((void)a++, a) == ++b)[.](#2.2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L1610)

[*Note [2](#note-2)*:

The requirement thata equals b implies++a equals ++b (which is not true for weakly incrementable types)
allows the use of multi-pass one-directional
algorithms with types that model [incrementable](#concept:incrementable "24.3.4.5 Concept incrementable [iterator.concept.inc]")[.](#3.sentence-1)

â *end note*]
