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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:031e1bf707c9ceb1ec430d41360b6727ad0458db

commit r13-9715-g031e1bf707c9ceb1ec430d41360b6727ad0458db
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Oct 29 09:26:19 2024 -0400

    libstdc++: Fix complexity of drop_view::begin() const [PR112641]

    Views are required to have a amortized O(1) begin(), but our drop_view's
    const begin overload is O(n) for non-common ranges with a non-sized
    sentinel.  This patch reimplements it so that it's O(1) always.  See
    also LWG 4009.

            PR libstdc++/112641

    libstdc++-v3/ChangeLog:

            * include/std/ranges (drop_view::begin): Reimplement const
            overload so that it's O(1) always.
            * testsuite/std/ranges/adaptors/drop.cc (test10): New test.

    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>
    (cherry picked from commit 7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61)

Reply via email to