This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofWP status.
views::iota(views::iota(0)) should be rejectedSection: 25.6.4.1[range.iota.overview]Status:WPSubmitter: Hewill KangOpened: 2024-05-08Last modified: 2024-07-08
Priority:Not Prioritized
View all otherissues in [range.iota.overview].
View all issues withWP status.
Discussion:
views::iota(E) literally means incrementing element E endlessly, butviews::iota(views::iota(0)) is currently well-formed due to CTAD,rejecting such unreasonable spelling seems therefore reasonable.
[2024-06-24; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[St. Louis 2024-06-29; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative toN4981.
Modify 25.6.4.1[range.iota.overview] as indicated:
-1-
-2- The nameiota_viewgenerates a sequence of elements by repeatedly incrementing an initial value.views::iotadenotes a customization point object (16.3.3.3.5[customization.point.object]).Given subexpressionsEandF, the expressionsviews::iota(E)andviews::iota(E, F)are expression-equivalent toiota_view<decay_t<decltype((E))>>(E)andiota_view(E, F), respectively.