Title
views::iota(views::iota(0)) should be rejected
Status
new
Section
[range.iota.overview]
Submitter
Hewill Kang

Created on 2024-05-08.00:00:00 last changed 1 month ago

Messages

Date: 2024-05-09.10:56:06

Proposed resolution:

This wording is relative to N4981.

  1. Modify [range.iota.overview] as indicated:

    -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 expressions views::iota(E) and views::iota(E, F) are expression-equivalent to iota_view<decay_t<decltype((E))>>(E) and iota_view(E, F), respectively.

Date: 2024-05-08.00:00:00

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.

History
Date User Action Args
2024-05-09 10:56:06adminsetmessages: + msg14128
2024-05-08 00:00:00admincreate