]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix tests/sundials/kinsol_08 warning 17224/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 8 Jul 2024 12:10:48 +0000 (08:10 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 8 Jul 2024 12:10:48 +0000 (08:10 -0400)
I don't quite know why clang 18 complains
/srv/temp/testsuite-rKmw5ZRc/dealii/tests/sundials/kinsol_08.cc:67:27:
warning: lambda capture 'N' is not required to be captured for this use
[-Wunused-lambda-capture]
   67 |   kinsol.reinit_vector = [N](VectorType &v) { v.reinit(N); };
but this fixes it

tests/sundials/kinsol_08.cc

index a2097f777d7ff372813aa174995cb2786c8e9234..b38797aa4debca750b2242656b2ab17990f33825 100644 (file)
@@ -64,7 +64,7 @@ main()
 
   SUNDIALS::KINSOL<VectorType> kinsol(data);
 
-  kinsol.reinit_vector = [N](VectorType &v) { v.reinit(N); };
+  kinsol.reinit_vector = [N = N](VectorType &v) { v.reinit(N); };
 
   kinsol.residual = [](const VectorType &u, VectorType &F) {
     deallog << "Evaluating the solution at u=(" << u[0] << ',' << u[1] << ')'

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.