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

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

https://gcc.gnu.org/g:7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61

commit r15-4740-g7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61
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>

Reply via email to