[libcxx-commits] [libcxx] [libc++] LWG4490: Allow calling `std::ranges::size` in ranges algorithms (PR #217460)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 20 06:04:13 PDT 2026


philnik777 wrote:

> In the general case, this patch does not affect performance. However, in the case identified by LWG4490, it can remove an O(n) traversal, thereby significantly improving the performance of algorithms such as `push_heap` in that case

Then we should only modify `push_heap`, and not every algorithm in existence.

https://github.com/llvm/llvm-project/pull/217460


More information about the libcxx-commits mailing list