[iterator.concept.iterator]

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

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

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

#### 24.3.4.6 Concept input_or_output_iterator [iterator.concept.iterator]

[1](#1)

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

The [input_or_output_iterator](#concept:input_or_output_iterator "24.3.4.6 Concept input_­or_­output_­iterator [iterator.concept.iterator]") concept forms the basis
of the iterator concept taxonomy; every iterator models [input_or_output_iterator](#concept:input_or_output_iterator "24.3.4.6 Concept input_­or_­output_­iterator [iterator.concept.iterator]")[.](#1.sentence-1)

This concept specifies operations for dereferencing and incrementing
an iterator[.](#1.sentence-2)

Most algorithms will require additional operations
to compare iterators with sentinels ([[iterator.concept.sentinel]](iterator.concept.sentinel "24.3.4.7 Concept sentinel_­for")), to
read ([[iterator.concept.input]](iterator.concept.input "24.3.4.9 Concept input_­iterator")) or write ([[iterator.concept.output]](iterator.concept.output "24.3.4.10 Concept output_­iterator")) values, or
to provide a richer set of iterator movements ([[iterator.concept.forward]](iterator.concept.forward "24.3.4.11 Concept forward_­iterator"), [[iterator.concept.bidir]](iterator.concept.bidir "24.3.4.12 Concept bidirectional_­iterator"), [[iterator.concept.random.access]](iterator.concept.random.access "24.3.4.13 Concept random_­access_­iterator"))[.](#1.sentence-3)

template<class I>concept [input_or_output_iterator](#concept:input_or_output_iterator "24.3.4.6 Concept input_­or_­output_­iterator [iterator.concept.iterator]") =requires(I i) {{ *i } -> [*can-reference*](iterator.synopsis#concept:can-reference "24.2 Header <iterator>&nbsp;synopsis [iterator.synopsis]"); } &&[weakly_incrementable](iterator.concept.winc#concept:weakly_incrementable "24.3.4.4 Concept weakly_­incrementable [iterator.concept.winc]")<I>;

[2](#2)

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

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

Unlike the *Cpp17Iterator* requirements,
the [input_or_output_iterator](#concept:input_or_output_iterator "24.3.4.6 Concept input_­or_­output_­iterator [iterator.concept.iterator]") concept does not require copyability[.](#2.sentence-1)

â *end note*]
