take_view
and drop_view
have different constraintsSection: 25.7.10.2 [range.take.view] Status: C++23 Submitter: Jens Maurer Opened: 2020-05-15 Last modified: 2023-11-22
Priority: 0
View all other issues in [range.take.view].
View all issues with C++23 status.
Discussion:
From this editorial issue request:
(Note "range R
" vs "class R
".)
In 25.7.10.2 [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 25.7.12.2 [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 oftake_view
from
template<range R>
to
template<class R>
[2020-07-17; Moved to Ready in telecon]
[2020-11-09 Approved In November virtual meeting. Status changed: Ready → WP.]
Proposed resolution:
This wording is relative to N4861.
Modify 25.7.10.2 [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>>; […]