Files
2025-10-25 03:02:53 +03:00

1.7 KiB
Raw Permalink Blame History

[range.iota.overview]

25 Ranges library [ranges]

25.6 Range factories [range.factories]

25.6.4 Iota view [range.iota]

25.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 expressionsviews::iota(E) and views::iota(E, F) are expression-equivalent toiota_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]

4

#

The name views::indices denotes a customization point object ([customization.point.object]).

Given subexpression E, let T be remove_cvref_t<decltype((E))>.

views::indices(E) is expression-equivalent toviews::iota(T(0), E) if is-integer-like is true, and ill-formed otherwise.