[clang-tools-extra] [llvm] [clang] [libcxx] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

Christopher Di Bella via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 28 13:26:20 PST 2023


================
@@ -0,0 +1,89 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TEST_SUPPORT_INVOCABLE_WITH_TELEMETRY_H
----------------
cjdb wrote:

My guess is "probably not", though we should come up with a consistent design (happy to work with you on that). I wasn't aware of those two, but the contents of `support/counting_predicates.h` weren't quite right for the application. I suggest we consolidate all of the counting invocable types into a single `counting_invocable` or `TracedInvocable` so that there's only one canonical type.

Looking at `TracedCopyMove`, it looks like it'll need a call operator added. Would you like me to add tests for explicitly counting copies and moves? It may be better to have these be separate tests for modularity.

Nothing has been applied yet, but I suspect a change to be made in the next week or so.

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


More information about the cfe-commits mailing list