Title
Deduction guides for take_view and drop_view have different constraints
Status
c++23
Section
[range.take.view]
Submitter
Jens Maurer

Created on 2020-05-15.00:00:00 last changed 12 months ago

Messages

Date: 2020-11-09.20:31:48

Proposed resolution:

This wording is relative to N4861.

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

    […]
    template<rangeclass R>
      take_view(R&&, range_difference_t<R>)
        -> take_view<views::all_t<R>>;
    […]
    
Date: 2020-11-09.00:00:00

[ 2020-11-09 Approved In November virtual meeting. Status changed: Ready → WP. ]

Date: 2020-07-15.00:00:00

[ 2020-07-17; Moved to Ready in telecon ]

Date: 2020-05-15.00:00:00

From this editorial issue request:

(Note "range R" vs "class R".)

In [range.take.view], the deduction guide for take_view is declared as:

template<range R>
  take_view(R&&, range_difference_t<R>)
    -> take_view<views::all_t<R>>;

In [range.drop.view], the deduction guide for drop_view is declared as:

template<class R>
  drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;

Note the difference between their template parameter lists.

Suggested resolution:

Change the deduction guide of take_view from

template<range R>

to

template<class R>

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2020-11-09 20:31:48adminsetmessages: + msg11548
2020-11-09 20:31:48adminsetstatus: ready -> wp
2020-07-17 22:37:26adminsetmessages: + msg11394
2020-07-17 22:37:26adminsetstatus: new -> ready
2020-05-16 18:30:26adminsetmessages: + msg11307
2020-05-15 00:00:00admincreate