[libcxx-commits] [libcxx] [libc++] Optimize ranges::for_each for iterating over __trees (PR #164405)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 1 08:23:06 PST 2025


================
@@ -0,0 +1,77 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <algorithm>
+
+// template<InputIterator Iter, Callable<auto, Iter::reference> Function>
+//   constexpr Function   // constexpr since C++20
+//   for_each(Iter first, Iter last, Function f);
----------------
ldionne wrote:

This signature is unlike most of our normal signatures for test synopses. Let's use a normal one. The comment should also explain what's specific about this test (i.e. we are testing the specialized for_each algorithms for associative containers).

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


More information about the libcxx-commits mailing list