Issue 4054: Repeating a repeat_view should repeat the view (original) (raw)
This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
4054. Repeating a repeat_view
should repeat the view
Section: 25.6.5.1 [range.repeat.overview] Status: WP Submitter: Tim Song Opened: 2024-02-12 Last modified: 2024-04-02
Priority: Not Prioritized
View all issues with WP status.
Discussion:
views::repeat(views::repeat(5))
should be a view of repeat_view
s, but it's currently a view of ints
due to the use of CTAD in the specification of views::repeat
.
[2024-03-12; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[Tokyo 2024-03-23; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4971.
- Modify 25.6.5.1 [range.repeat.overview] as indicated:
-1-
repeat_view
generates a sequence of elements by repeatedly producing the same value.-2- The name
views::repeat
denotes a customization point object (16.3.3.3.5 [customization.point.object]). Given subexpressionsE
andF
, the expressionsviews::repeat(E)
andviews::repeat(E, F)
are expression-equivalent torepeat_view<decay_t<decltype((E))>>(E)
andrepeat_view(E, F)
, respectively.