Date
2022-07-17.08:48:44
Message id
12602

Content

Proposed resolution:

This wording is relative to N4910.

  1. Modify [range.drop.view], class template drop_view synopsis, as indicated:

    [Drafting note: s and count_ usually have different types, but I think it's safe to perform comparison and subtraction, as count_ is non-negative as long as the behavior is well-defined.]

    […]
    constexpr auto size() requires sized_range<V> {
      const auto s = ranges::size(base_);
      const auto c = static_cast<decltype(s)>(count_);
      return static_cast<decltype(s)>(s < ccount_ ? 0 : s - ccount_);
    }
    
    constexpr auto size() const requires sized_range<const V> {
      const auto s = ranges::size(base_);
      const auto c = static_cast<decltype(s)>(count_);
      return static_cast<decltype(s)>(s < ccount_ ? 0 : s - ccount_);
    }
    […]