23
Iterators library
[iterators]
23.3
Iterator requirements
[iterator.requirements]
23.3.4
Iterator concepts
[iterator.concepts]
23.3.4.6
Concept
input_or_output_iterator
[iterator.concept.iterator]
1
#
The
input_or_output_iterator
concept forms the basis of the iterator concept taxonomy; every iterator models
input_or_output_iterator
.
This concept specifies operations for dereferencing and incrementing an iterator
.
Most algorithms will require additional operations to compare iterators with sentinels (
[iterator.
concept.
sentinel]
), to read (
[iterator.
concept.
input]
) or write (
[iterator.
concept.
output]
) values, or to provide a richer set of iterator movements (
[iterator.
concept.
forward]
,
[iterator.
concept.
bidir]
,
[iterator.
concept.
random.
access]
)
.
template
<
class
I
>
concept
input_or_output_iterator
=
requires
(
I i
)
{
{
*
i
}
-
>
can-reference
;
}
&
&
weakly_incrementable
<
I
>
;
2
#
[
Note
1
:
Unlike the
Cpp17Iterator
requirements, the
input_or_output_iterator
concept does not require copyability
.
—
end note
]