libstdc++: Implement remaining P2474R2 changes to views::take/drop
commitfb4db9bc1c567eaf850e997853d084d0832dd4c1
authorPatrick Palka <ppalka@redhat.com>
Wed, 19 Oct 2022 19:43:13 +0000 (19 15:43 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 19 Oct 2022 19:43:13 +0000 (19 15:43 -0400)
tree11ca7676c367103a5027b81cc1fa8693164c02b8
parentb3c98d6a59a6dcd5b0b52bd5676b586ef4fe785f
libstdc++: Implement remaining P2474R2 changes to views::take/drop

libstdc++-v3/ChangeLog:

* include/std/ranges (views::__detail::__is_repeat_view): Define
and later define a partial specialization.
(views::__detail::__take_of_repeat_view): Declare and later define.
(views::__detail::__drop_of_repeat_view): Likewise.
(views::_Take::operator()): Return a repeat_view if the argument
is a repeat_view as per P2474R2.
(views::_Drop::operator()): Likewise.
(repeat_view): Befriend __take/drop_of_repeat_view.
* testsuite/std/ranges/repeat/1.cc (test04): New test.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/repeat/1.cc