From 0f30de7070797a8fc5a105ceeee9c6766f358f20 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 17 Jan 2023 14:54:34 -0600 Subject: [PATCH] Tests: optimization/* add missing include Some of the optimization tests use a std::function object but forget to include the header. These tests work with older versions of libstdc++ due to some transitive include but fail for current versions: /home/testsuite/workspace/regression_tests/dealii/include/deal.II/optimization/line_minimization.h:323:16: error: 'function' in namespace 'std' does not name a template type 323 | const std::function(const NumberType x)> | ^~~~~~~~ /home/testsuite/workspace/regression_tests/dealii/include/deal.II/optimization/line_minimization.h:30:1: note: 'std::function' is defined in header ''; did you forget to '#include '? 29 | #include +++ |+#include 30 | #include --- tests/optimization/cubic_fit.cc | 1 + tests/optimization/cubic_fit_three_points.cc | 1 + tests/optimization/line_minimization.cc | 1 + tests/optimization/line_minimization_02.cc | 1 + tests/optimization/line_minimization_03.cc | 1 + tests/optimization/line_minimization_03b.cc | 1 + tests/optimization/quadratic_fit.cc | 1 + 7 files changed, 7 insertions(+) diff --git a/tests/optimization/cubic_fit.cc b/tests/optimization/cubic_fit.cc index d1175ba9ab..1866f03cb1 100644 --- a/tests/optimization/cubic_fit.cc +++ b/tests/optimization/cubic_fit.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/cubic_fit_three_points.cc b/tests/optimization/cubic_fit_three_points.cc index 4fa4b1f543..03f774fc56 100644 --- a/tests/optimization/cubic_fit_three_points.cc +++ b/tests/optimization/cubic_fit_three_points.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/line_minimization.cc b/tests/optimization/line_minimization.cc index 9c7fbe8320..b3b124129c 100644 --- a/tests/optimization/line_minimization.cc +++ b/tests/optimization/line_minimization.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/line_minimization_02.cc b/tests/optimization/line_minimization_02.cc index e7872fe300..ecdfc38ba5 100644 --- a/tests/optimization/line_minimization_02.cc +++ b/tests/optimization/line_minimization_02.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/line_minimization_03.cc b/tests/optimization/line_minimization_03.cc index 43cf485f40..50705730c3 100644 --- a/tests/optimization/line_minimization_03.cc +++ b/tests/optimization/line_minimization_03.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/line_minimization_03b.cc b/tests/optimization/line_minimization_03b.cc index 5f889e53dd..c605c307c0 100644 --- a/tests/optimization/line_minimization_03b.cc +++ b/tests/optimization/line_minimization_03b.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include "../tests.h" diff --git a/tests/optimization/quadratic_fit.cc b/tests/optimization/quadratic_fit.cc index 1b9510cfd4..9bc6464486 100644 --- a/tests/optimization/quadratic_fit.cc +++ b/tests/optimization/quadratic_fit.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include "../tests.h" -- 2.39.5