From: Timo Heister Date: Sun, 25 Jun 2023 18:43:43 +0000 (-0400) Subject: fix kinsol unused lambda capture warning X-Git-Tag: v9.5.0-rc1~19^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=496d747d87c1a6c886918a4ebe820e8e9cc26316;p=dealii.git fix kinsol unused lambda capture warning --- diff --git a/source/sundials/kinsol.cc b/source/sundials/kinsol.cc index b0fbcd5044..e819db7c1a 100644 --- a/source/sundials/kinsol.cc +++ b/source/sundials/kinsol.cc @@ -228,14 +228,12 @@ namespace SUNDIALS // helper function to create N_Vectors compatible with different versions // of SUNDIALS - const auto make_compatible_nvector_view = [this](auto &v) { - return internal::make_nvector_view(v -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) - , - kinsol_ctx + const auto make_compatible_nvector_view = +# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) + [](auto &v) { return internal::make_nvector_view(v); }; +# else + [this](auto &v) { return internal::make_nvector_view(v, kinsol_ctx); }; # endif - ); - }; VectorType ones;