From 0bc1539f45890f7df9ae70973396fa27b79cd293 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 5 Jan 2023 18:11:33 +0100
Subject: [PATCH] Drop clang workaround

---
 src/SubModel.cc | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/SubModel.cc b/src/SubModel.cc
index a4d08094..1dd859cf 100644
--- a/src/SubModel.cc
+++ b/src/SubModel.cc
@@ -1227,15 +1227,8 @@ PacModelTable::transformPass(const lag_equivalence_table_t &unary_ops_nodes,
 
           // Associate the coefficients of the linear combination with the right components
           for (auto [var, coeff] : terms)
-            /* C++20 allows the capture of structured bindings (contrary to
-               C++17), and GCC 10 implements it (actually it even supports it
-               in C++17 compatibility mode, see
-               https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889). However,
-               clang 14 does not, though some work seems on the way
-               (https://reviews.llvm.org/D122768/new/). Hence we use the
-               “var=var” capture with initializer as a workaround. */
             if (auto it = find_if(components.begin(), components.end(),
-                                  [&, var=var](const auto &v) { return get<0>(v) == dynamic_model.AddVariable(var); });
+                                  [&](const auto &v) { return get<0>(v) == dynamic_model.AddVariable(var); });
                 it != components.end())
               get<4>(*it) = coeff;
             else
-- 
GitLab