https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100631
--- Comment #12 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:648c786bc6451115604c60abcc7977b3c6987ae4 commit r10-9903-g648c786bc6451115604c60abcc7977b3c6987ae4 Author: Patrick Palka <ppa...@redhat.com> Date: Tue May 18 00:26:07 2021 -0400 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. (cherry picked from commit 2e2eef80ac0c21f9533e6791ccf5e29458cbb77c)