From b2dfa6cd8b42af749f69e19da22888276a59a37e Mon Sep 17 00:00:00 2001 From: Dave-Poissant Date: Wed, 6 Mar 2024 16:51:51 -0500 Subject: [PATCH] Fix test build of nlopt algo --- tests/nlopt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/nlopt.cpp b/tests/nlopt.cpp index 605baabf7..a16b733c1 100644 --- a/tests/nlopt.cpp +++ b/tests/nlopt.cpp @@ -385,7 +385,8 @@ BOOST_AUTO_TEST_CASE(nlopt_loc_opt) BOOST_AUTO_TEST_CASE(nlopt_initial_population_not_respecting_bounds_throw_test) { // We test that the algorithm throws if the initial population does not respect the bounds - auto pop = population{hs71{}, 1}; + auto prob = hs71{}; + auto pop = population{prob, 1}; auto a = nlopt{"slsqp"}; auto dv = pop.get_x()[0]; dv[0] = prob.get_bounds().first[0] - 1.;