From d9f7ac4c9be88f1e6d8b953c0c71195e1fa31f8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 8 Mar 2019 18:57:17 +0100
Subject: [PATCH] Fix bug introduced in
 7d16fff786c477c7ff6ddf8a52a0fa61b670eb50

Here, emplace() and insert() are not interchangeable because this is a std::set of
std::vector<int>, and we really want the initializer-list constructor of
std::vector (and not the two int's constructor).

Fixes the test deterministic_simulations/lola_solve_one_boundary.mod
---
 src/ModelTree.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 3b438355..febb1e68 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -411,7 +411,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context, jacob_m
             {
               if (verbose)
                 cout << "the coefficient related to variable " << var << " with lag " << lag << " in equation " << eq << " is equal to " << val << " and is set to 0 in the incidence matrix (size=" << symbol_table.endo_nbr() << ")" << endl;
-              jacobian_elements_to_delete.emplace(eq, deriv_id);
+              jacobian_elements_to_delete.insert({ eq, deriv_id });
             }
           else
             {
-- 
GitLab