24
Ranges library
[ranges]
24.6
Range factories
[range.factories]
24.6.4
Iota view
[range.iota]
24.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
{
E
}
and
iota_view
{
E, F
}
, respectively
.
3
#
[
Example
1
:
for
(
int
i
:
iota_view
{
1
,
10
}
)
cout
<
<
i
<
<
' '
;
// prints: 1 2 3 4 5 6 7 8 9
—
end example
]