libstdc++: Fix miscellaneous issues with elements_view::_Sentinel [PR100631]
authorPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 04:26:07 +0000 (00:26 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 04:26:07 +0000 (00:26 -0400)
commit2e2eef80ac0c21f9533e6791ccf5e29458cbb77c
tree0cd19995ce193eaefcac424a400a1f1362bdeb4f
parenta7ffc1ef6e38c01037c8894a6bc1889d6f875444
libstdc++: Fix miscellaneous issues with elements_view::_Sentinel [PR100631]

libstdc++-v3/ChangeLog:

PR libstdc++/100631
* include/std/ranges (elements_view::_Iterator): Also befriend
_Sentinel<!_Const>.
(elements_view::_Sentinel::_M_equal): Templatize.
(elements_view::_Sentinel::_M_distance_from): Split out from ...
(elements_view::_Sentinel::operator-): ... here.  Depend on
_Base2 instead of _Base in the return type.
* testsuite/std/ranges/adaptors/elements.cc (test06, test07):
New tests.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc