[Bug libstdc++/93936] [ranges] std::ranges::split_view<...>::_OuterIter<...>::__current() is private within this context

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 26 15:25:00 GMT 2020


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

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

https://gcc.gnu.org/g:8ce13842b50cbd2676f2e322995182af20df31fe

commit r10-6871-g8ce13842b50cbd2676f2e322995182af20df31fe
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Feb 26 08:38:06 2020 -0500

    libstdc++: Fix use of inaccessible private member in split_view (PR93936)

    We are calling _OuterIter::__current from _InnerIter::operator==, but the
former
    is private within this non-member friend.  Fix this by calling
    _OuterIter::operator== instead, which does the right thing here.

    libstdc++-v3/ChangeLog:

        PR libstdc++/93936
        * include/std/ranges (split_view::_InnerIter::operator==): Compare
        the operands' _M_i rather than their _M_i.current().
        * testsuite/std/ranges/adaptors/split.cc: Augment test.


More information about the Gcc-bugs mailing list