Title
Range adaptors introduced by P1035 do not require viewable_range
Status
nad
Section
[range.take.while.view][range.drop.view] [range.drop.while.view]
Submitter
Christopher Di Bella

Created on 2019-09-24.00:00:00 last changed 59 months ago

Messages

Date: 2020-02-13.12:32:11

Proposed resolution:

This wording is relative to N4830.

  1. Modify [range.take.while.view], class template take_while_view synopsis, as indicated:

    namespace std::ranges {
      […]
      template<classinput_range R, class Pred>
        requires viewable_range<R> && 
            indirect_unary_predicate<const Pred, iterator_t<R>>
          take_while_view(R&&, Pred) -> take_while_view<all_view<R>, Pred>;
    }
    
  2. Modify [range.drop.view], class template drop_view synopsis, as indicated:

    namespace std::ranges {
      […]
      template<classinput_range R>
        requires viewable_range<R>
          drop_view(R&&, range_difference_t<R>) -> drop_view<all_view<R>>;
    }
    
  3. Modify [range.drop.while.view], class template drop_while_view synopsis, as indicated:

    namespace std::ranges {
      […]
      template<classinput_range R, class Pred>
        requires viewable_range<R> && 
            indirect_unary_predicate<const Pred, iterator_t<R>>
          drop_while_view(R&&, Pred) -> drop_while_view<all_view<R>, Pred>;
    }
    
Date: 2020-02-13.12:32:11

[ 2020-02 Status to NAD on Thursday morning in Prague. ]

Date: 2019-09-24.00:00:00

After adoption of P1035 range adaptor closure is described to take a viewable_range as input, and return a view as output. The deduction-guides for take_while_view, drop_view, and drop_while_view do not currently impose the viewable_range requirement.

History
Date User Action Args
2020-02-13 12:32:11adminsetmessages: + msg11061
2020-02-13 12:32:11adminsetstatus: new -> nad
2019-09-24 19:26:12adminsetmessages: + msg10667
2019-09-24 00:00:00admincreate