Skip to content

Commit 29d8d92

Browse files
cameroncusterCameron Custerweb-flow
authored
pass recursive lambda self param by reference (#222)
* pass recursive lambda self param by reference * [auto-verifier] verify commit 440b31b * fix stale cppcheck suppression line number --------- Co-authored-by: Cameron Custer <cam@augmentcode.com> Co-authored-by: GitHub <noreply@github.com>
1 parent e89c97e commit 29d8d92

20 files changed

Lines changed: 51 additions & 51 deletions

.verify-helper/timestamps.remote.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"tests/library_checker_aizu_tests/convolution/gcd_convolution.test.cpp": "2025-08-28 13:19:16 -0600",
33
"tests/library_checker_aizu_tests/convolution/lcm_convolution.test.cpp": "2025-08-28 13:19:16 -0600",
4-
"tests/library_checker_aizu_tests/convolution/min_plus_convolution.test.cpp": "2026-04-12 16:21:27 -0600",
4+
"tests/library_checker_aizu_tests/convolution/min_plus_convolution.test.cpp": "2026-07-06 09:57:36 -0700",
55
"tests/library_checker_aizu_tests/convolution/xor_convolution.test.cpp": "2026-03-06 12:17:28 -0700",
66
"tests/library_checker_aizu_tests/data_structures/binary_search_example.test.cpp": "2024-11-18 10:51:39 -0600",
77
"tests/library_checker_aizu_tests/data_structures/binary_trie.test.cpp": "2026-01-18 02:20:40 +0000",
@@ -55,33 +55,33 @@
5555
"tests/library_checker_aizu_tests/dsu/range_parallel_dsu.test.cpp": "2026-04-26 11:38:07 -0600",
5656
"tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2024-11-17 14:04:03 -0600",
5757
"tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp": "2026-04-06 14:41:55 -0600",
58-
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_bcc.test.cpp": "2026-04-12 16:21:27 -0600",
59-
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp": "2026-04-12 16:21:27 -0600",
60-
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2026-04-12 16:21:27 -0600",
61-
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2026-04-12 16:21:27 -0600",
62-
"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2026-07-06 09:26:00 -0700",
58+
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_bcc.test.cpp": "2026-07-06 09:57:36 -0700",
59+
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp": "2026-07-06 09:57:36 -0700",
60+
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2026-07-06 09:57:36 -0700",
61+
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2026-07-06 09:57:36 -0700",
62+
"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2026-07-06 09:57:36 -0700",
6363
"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2026-04-06 14:41:55 -0600",
6464
"tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp": "2026-04-06 14:41:55 -0600",
6565
"tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp": "2026-04-26 11:38:07 -0600",
66-
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-04-12 16:21:27 -0600",
66+
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-07-06 09:57:36 -0700",
6767
"tests/library_checker_aizu_tests/graphs/enumerate_triangles.test.cpp": "2026-04-26 11:38:07 -0600",
68-
"tests/library_checker_aizu_tests/graphs/euler_walk_directed.test.cpp": "2026-04-12 16:21:27 -0600",
69-
"tests/library_checker_aizu_tests/graphs/euler_walk_undirected.test.cpp": "2026-04-12 16:21:27 -0600",
68+
"tests/library_checker_aizu_tests/graphs/euler_walk_directed.test.cpp": "2026-07-06 09:57:36 -0700",
69+
"tests/library_checker_aizu_tests/graphs/euler_walk_undirected.test.cpp": "2026-07-06 09:57:36 -0700",
7070
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_aizu.test.cpp": "2026-05-01 11:34:51 -0600",
7171
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_lib_checker.test.cpp": "2026-05-01 11:34:51 -0600",
7272
"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2026-01-22 10:08:22 -0700",
73-
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-04-12 16:21:27 -0600",
74-
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-04-12 16:21:27 -0600",
75-
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-04-12 16:21:27 -0600",
76-
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-04-12 16:21:27 -0600",
77-
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-04-27 08:17:20 -0600",
73+
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-07-06 09:57:36 -0700",
74+
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-06 09:57:36 -0700",
75+
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-06 09:57:36 -0700",
76+
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-07-06 09:57:36 -0700",
77+
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-06 09:57:36 -0700",
7878
"tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-01-22 10:08:22 -0700",
79-
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-04-27 08:17:20 -0600",
79+
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-06 09:57:36 -0700",
8080
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-01-28 21:48:16 -0700",
8181
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-04-26 11:38:07 -0600",
8282
"tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-01-18 02:20:40 +0000",
8383
"tests/library_checker_aizu_tests/handmade_tests/kd_bit.test.cpp": "2026-02-19 18:06:52 -0700",
84-
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-06-27 18:29:52 -0500",
84+
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-06 09:57:36 -0700",
8585
"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-04-26 11:38:07 -0600",
8686
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-04-26 11:38:07 -0600",
8787
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2025-02-10 14:50:36 -0700",
@@ -132,23 +132,23 @@
132132
"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2026-04-12 06:15:25 -0600",
133133
"tests/library_checker_aizu_tests/strings/trie.test.cpp": "2026-01-17 12:38:18 -0700",
134134
"tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2026-04-26 11:38:07 -0600",
135-
"tests/library_checker_aizu_tests/trees/cd_count_paths_per_length.test.cpp": "2026-04-26 21:56:36 -0600",
136-
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-07-06 09:26:00 -0700",
137-
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-06 09:26:00 -0700",
138-
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-04-27 08:17:20 -0600",
139-
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-04-27 08:17:20 -0600",
135+
"tests/library_checker_aizu_tests/trees/cd_count_paths_per_length.test.cpp": "2026-07-06 09:57:36 -0700",
136+
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-07-06 09:57:36 -0700",
137+
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-06 09:57:36 -0700",
138+
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-07-06 09:57:36 -0700",
139+
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-07-06 09:57:36 -0700",
140140
"tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-07-06 09:26:00 -0700",
141141
"tests/library_checker_aizu_tests/trees/hld_aizu2.test.cpp": "2026-04-26 11:38:07 -0600",
142142
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-06 09:26:00 -0700",
143143
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-06 09:26:00 -0700",
144144
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-06 09:26:00 -0700",
145-
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-06-27 13:02:40 -0500",
146-
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-06-27 13:02:40 -0500",
147-
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-06-27 18:29:52 -0500",
148-
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-04-26 11:38:07 -0600",
149-
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-04-26 11:38:07 -0600",
150-
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-04-26 11:38:07 -0600",
151-
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-04-12 16:21:27 -0600",
152-
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-04-26 11:38:07 -0600",
153-
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-04-12 16:21:27 -0600"
145+
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-06 09:57:36 -0700",
146+
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-06 09:57:36 -0700",
147+
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-06 09:57:36 -0700",
148+
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-06 09:57:36 -0700",
149+
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-06 09:57:36 -0700",
150+
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-06 09:57:36 -0700",
151+
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-07-06 09:57:36 -0700",
152+
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-07-06 09:57:36 -0700",
153+
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-07-06 09:57:36 -0700"
154154
}

library/convolution/min_plus_convolution_convex_and_arbitrary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vi min_plus(const vi& convex, const vi& arbitrary) {
99
int n = sz(convex);
1010
int m = sz(arbitrary);
1111
vi res(n + m - 1, INT_MAX);
12-
auto dnc = [&](auto dnc, int res_le, int res_ri,
12+
auto dnc = [&](auto&& dnc, int res_le, int res_ri,
1313
int arb_le, int arb_ri) {
1414
if (res_le >= res_ri) return;
1515
int mid_res = (res_le + res_ri) / 2;

library/graphs/bcc_callback.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
void bcc(const auto& g, auto f) {
4545
int n = sz(g), q = 0, s = 0;
4646
vi t(n), st(n);
47-
auto dfs = [&](auto dfs, int u) -> int {
47+
auto dfs = [&](auto&& dfs, int u) -> int {
4848
int l = t[u] = ++q;
4949
for (int v : g[u]) {
5050
int siz = s, lu = 0;

library/graphs/euler_path.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
vector<pii> euler_path(auto& g, int m, int s) {
1717
vi vis(m);
1818
vector<pii> path;
19-
auto dfs = [&](auto dfs, int u, int eu) -> void {
19+
auto dfs = [&](auto&& dfs, int u, int eu) -> void {
2020
while (!empty(g[u])) {
2121
auto [v, ev] = g[u].back();
2222
g[u].pop_back();

library/graphs/scc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
auto scc(const auto& g) {
1212
int n = sz(g), num_sccs = 0, q = 0, s = 0;
1313
vi scc_id(n, -1), tin(n), st(n);
14-
auto dfs = [&](auto dfs, int u) -> int {
14+
auto dfs = [&](auto&& dfs, int u) -> int {
1515
int low = tin[u] = ++q;
1616
st[s++] = u;
1717
for (int v : g[u])

library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ vector<pii> extra_edges(const auto& g, int num_sccs,
2929
zero_in[scc_id[v]] = 0;
3030
}
3131
vector<bool> vis(num_sccs);
32-
auto dfs = [&](auto dfs, int u) {
32+
auto dfs = [&](auto&& dfs, int u) {
3333
if (empty(scc_g[u])) return u;
3434
for (int v : scc_g[u])
3535
if (!vis[v]) {

library/graphs/strongly_connected_components/offline_incremental_scc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ vi offline_incremental_scc(vector<array<int, 2>> eds,
1616
vi ids(n, -1), joins(m, m), idx(m), vs(n), scc_id;
1717
iota(all(idx), 0);
1818
vector<vi> g;
19-
auto dnc = [&](auto dnc, auto el, auto er, int tl,
19+
auto dnc = [&](auto&& dnc, auto el, auto er, int tl,
2020
int tr) {
2121
g.clear();
2222
int mid = midpoint(tl, tr);

library/graphs/uncommon/bridges.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
auto bridges(const auto& g, int m) {
1919
int n = sz(g), num_ccs = 0, q = 0, s = 0;
2020
vi br_id(n, -1), is_br(m), tin(n), st(n);
21-
auto dfs = [&](auto dfs, int u, int p) -> int {
21+
auto dfs = [&](auto&& dfs, int u, int p) -> int {
2222
int low = tin[u] = ++q;
2323
st[s++] = u;
2424
for (auto [v, e] : g[u])

library/graphs/uncommon/cuts.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
auto cuts(const auto& g, int m) {
2020
int n = sz(g), num_bccs = 0, q = 0, s = 0;
2121
vi bcc_id(m, -1), is_cut(n), tin(n), st(m);
22-
auto dfs = [&](auto dfs, int u, int p) -> int {
22+
auto dfs = [&](auto&& dfs, int u, int p) -> int {
2323
int low = tin[u] = ++q;
2424
for (auto [v, e] : g[u]) {
2525
assert(u != v);

library/trees/centroid_decomp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! @space O(n)
99
vi cd(auto& g, auto f) {
1010
vi p(sz(g), -1), s(sz(g), sz(g));
11-
auto ctd = [&](auto ctd, int u, int p, int n) -> int {
11+
auto ctd = [&](auto&& ctd, int u, int p, int n) -> int {
1212
s[u] = 1;
1313
for (int v : g[u])
1414
if (v != p) {
@@ -17,7 +17,7 @@ vi cd(auto& g, auto f) {
1717
}
1818
return 2 * s[u] >= n ? s[p] = n - s[u], u : -1;
1919
};
20-
auto dfs = [&](auto dfs, int u) -> int {
20+
auto dfs = [&](auto&& dfs, int u) -> int {
2121
f(u = ctd(ctd, u, u, s[u]));
2222
for (int v : g[u]) erase(g[v], u), p[dfs(dfs, v)] = u;
2323
return u;

0 commit comments

Comments
 (0)