26
Ranges library
[ranges]
26.6
Range factories
[range.factories]
26.6.4
Iota view
[range.iota]
26.6.4.1
Overview
[range.iota.overview]
1
#
iota_
view
generates a sequence of elements by repeatedly incrementing an initial value
.
2
#
The name
views
::
iota
denotes a customization point object (
[customization.
point.
object]
)
.
Given subexpressions
E
and
F
, the expressions
views
::
iota
(
E
)
and
views
::
iota
(
E, F
)
are expression-equivalent to
iota_
view
<
decay_
t
<
decltype
(
(
E
)
)
>
>
(
E
)
and
iota_
view
(
E, F
)
, respectively
.
3
#
[
Example
1
:
for
(
int
i
:
views
::
iota
(
1
,
10
)
)
cout
<
<
i
<
<
' '
;
// prints
1 2 3 4 5 6 7 8 9
—
end example
]