[Bug libstdc++/100631] ranges::elements_view:: _Sentinel is missing __distance_from() that can access _M_current of _Iterator

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 10 18:54:28 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100631

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:fd4db3ddc3639e03f557010b8e0e947e4b51633e

commit r11-8541-gfd4db3ddc3639e03f557010b8e0e947e4b51633e
Author: Patrick Palka <ppalka@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)


More information about the Gcc-bugs mailing list