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.
views::iota(views::iota(0))
should be rejectedSection: 26.6.4.1 [range.iota.overview] Status: WP Submitter: Hewill Kang Opened: 2024-05-08 Last modified: 2024-07-08
Priority: Not Prioritized
View all issues with WP status.
Discussion:
views::iota(E)
literally means incrementing element E endlessly, but
views::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 to N4981.
Modify 26.6.4.1 [range.iota.overview] as indicated:
-1-
-2- The nameiota_view
generates a sequence of elements by repeatedly incrementing an initial value.views::iota
denotes a customization point object (16.3.3.3.5 [customization.point.object]). Given subexpressionsE
andF
, the expressionsviews::iota(E)
andviews::iota(E, F)
are expression-equivalent toiota_view<decay_t<decltype((E))>>(E)
andiota_view(E, F)
, respectively.