diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-10-29 09:26:19 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-10-29 09:26:19 -0400 |
commit | 7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61 (patch) | |
tree | a40dbea2b0dd6885d4d4a8fc0a72587e207ce037 /gcc/fortran/error.cc | |
parent | 7f41203f08b9948c1c636dc9d66571121c6c7793 (diff) | |
download | gcc-7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61.zip gcc-7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61.tar.gz gcc-7f622ee83fbbcf4a4ca70e020db8a0ce4b556b61.tar.bz2 |
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 <jwakely@redhat.com>
Diffstat (limited to 'gcc/fortran/error.cc')
0 files changed, 0 insertions, 0 deletions