Title
split_view<V, P>::inner-iterator<true>::operator++(int) should depend on Base
Status
c++23
Section
[range.lazy.split.inner]
Submitter
Casey Carter

Created on 2021-03-11.00:00:00 last changed 4 months ago

Messages

Date: 2021-06-07.16:58:04

Proposed resolution:

This wording is relative to N4878.

  1. Modify [range.split.inner] as indicated:

    constexpr decltype(auto) operator++(int) {
      if constexpr (forward_range<VBase>) {
        auto tmp = *this;
        ++*this;
        return tmp;
      } else
        ++*this;
    }
    
Date: 2021-06-07.00:00:00

[ 2021-06-07 Approved at June 2021 virtual plenary. Status changed: Voting → WP. ]

Date: 2021-04-15.00:00:00

[ 2021-04-20; Reflector poll ]

Set status to Tentatively Ready after five votes in favour during reflector poll.

Date: 2021-03-11.00:00:00

split_view<V, P>::inner-iterator<Const>::operator++(int) is specified directly in the synopsis in [range.split.inner] as:

constexpr decltype(auto) operator++(int) {
  if constexpr (forward_range<V>) {
    auto tmp = *this;
    ++*this;
    return tmp;
  } else
    ++*this;
}

The dependency on the properties of V here is odd given that we are wrapping an iterator obtained from a maybe-const<Const, V> (aka Base). It seems like this function should instead be concerned with forward_range<Base>.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2021-06-07 16:58:04adminsetmessages: + msg11901
2021-06-07 16:58:04adminsetstatus: voting -> wp
2021-05-26 21:11:22adminsetstatus: ready -> voting
2021-04-20 20:35:49adminsetmessages: + msg11771
2021-04-20 20:35:49adminsetstatus: new -> ready
2021-03-13 13:54:03adminsetmessages: + msg11743
2021-03-11 00:00:00admincreate