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

1.2 KiB
Raw Permalink Blame History

[range.repeat.overview]

25 Ranges library [ranges]

25.6 Range factories [range.factories]

25.6.5 Repeat view [range.repeat]

25.6.5.1 Overview [range.repeat.overview]

1

#

repeat_view generates a sequence of elements by repeatedly producing the same value.

2

#

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

Given subexpressions E and F, the expressions views::repeat(E) and views::repeat(E, F) are expression-equivalent torepeat_view<decay_t<decltype((E))>>(E) and repeat_view(E, F), respectively.

3

#

[Example 1: for (int i : views::repeat(17, 4)) cout << i << ' ';// prints 17 17 17 17 — end example]