Created on 2024-05-09.00:00:00 last changed 16 months ago
Proposed resolution:
This wording is relative to N4981.
Modify [range.reverse.overview] as indicated:
-1-
-2- The namereverse_viewtakes a bidirectional view and produces another view that iterates the same elements in reverse order.views::reversedenotes a range adaptor object ([range.adaptor.object]). Given a subexpressionE, the expressionviews::reverse(E)is expression-equivalent to:
(2.1) — If the type of
Eis a (possibly cv-qualified) specialization ofreverse_view, equivalent toE.base().(2.?) — Otherwise, if the type of
Eis a (possibly cv-qualified) specialization ofempty_view([range.empty.view]),single_view([range.single.view]), orrepeat_view([range.repeat.view]), equivalent todecay-copy(E).(2.2) — Otherwise, if the type of
Eis cvsubrange<reverse_iterator<I>, reverse_iterator<I>, K>for some iterator typeIand valueKof typesubrange_kind,
(2.2.1) — if
Kissubrange_kind::sized, equivalent to:subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())(2.2.2) — otherwise, equivalent to:
subrange<I, I, K>(E.end().base(), E.begin().base())However, in either case
Eis evaluated only once.(2.3) — Otherwise, equivalent to
reverse_view{E}.
[ 2024-06-24; Reflector poll ]
Set priority to 3 after reflector poll. Send to LEWG for review. The `repeat` part is related to LWG 4019.
Currently, when views::reverse is applied to empty_view, single_view, or
repeat_view, a reverse_view with the iterator type reverse_iterator will
be produced.
views::repeat(0) | views::reverse | views::take(5) no longer timeout,
which seems to be an improvement.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2024-06-24 12:09:57 | admin | set | messages: + msg14190 |
| 2024-06-24 12:09:57 | admin | set | status: new -> lewg |
| 2024-05-10 10:18:45 | admin | set | messages: + msg14132 |
| 2024-05-09 00:00:00 | admin | create | |