libstdc++: Fix access issue in elements_view::_Sentinel [PR100631]
authorPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 14:21:27 +0000 (10:21 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 14:21:27 +0000 (10:21 -0400)
commit38751c4d5e15bd1c682ac4c868a2c4ce48ca5503
treeff029950b27ac33561b143c489fe2c1a73ea127f
parent8b9484c54b4000209d4bfb270e22c9c8b9673fdb
libstdc++: Fix access issue in elements_view::_Sentinel [PR100631]

In the earlier commit r12-854 I forgot to also rewrite the other operator-
overload in terms of the split-out member function _M_distance_from.

libstdc++-v3/ChangeLog:

PR libstdc++/100631
* include/std/ranges (elements_view::_Sentinel::operator-): Use
_M_distance_from in the other operator- overload too.
* testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc