From 84a3c8789fb2f9222d0006cbefa8a671700b4e82 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 14 Jun 2026 14:06:48 -0700 Subject: [PATCH] fix scoping for functions Signed-off-by: Nikolaj Bjorner --- src/solver/parallel_tactical2.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/solver/parallel_tactical2.cpp b/src/solver/parallel_tactical2.cpp index 2d73046bd..36c17d5ce 100644 --- a/src/solver/parallel_tactical2.cpp +++ b/src/solver/parallel_tactical2.cpp @@ -1926,18 +1926,17 @@ public: /* Launch threads. */ vector threads; for (auto *w : m_workers) - threads.push_back(std::thread([&]() { - safe_run([w]() -> void { w->run(); }, w->limit()); + threads.push_back(std::thread([w, &safe_run]() { + safe_run([w]() { w->run(); }, w->limit()); })); if (m_core_minimizer_worker) - threads.push_back(std::thread([&]() { - safe_run([this]() -> void { m_core_minimizer_worker->run(); }, m_core_minimizer_worker->limit()); + threads.push_back(std::thread([this, &safe_run]() { + safe_run([this]() { m_core_minimizer_worker->run(); }, m_core_minimizer_worker->limit()); })); for (auto* w : m_global_backbones_workers) - threads.push_back(std::thread([&]() { - safe_run([w]() -> void { - w->run(); }, w->limit()); - })); + threads.push_back(std::thread([w, &safe_run]() { + safe_run([w]() { w->run(); }, w->limit()); + })); for (auto& t : threads) t.join();