https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100631
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:b1f54b2b7d876c72ab05afb0df214aba205f94ad commit r10-9904-gb1f54b2b7d876c72ab05afb0df214aba205f94ad Author: Patrick Palka <ppa...@redhat.com> Date: Tue May 18 10:21:27 2021 -0400 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. (cherry picked from commit 38751c4d5e15bd1c682ac4c868a2c4ce48ca5503)