]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::lambda instead of boost::lambda 7808/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 14 Mar 2019 22:00:30 +0000 (18:00 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 14 Mar 2019 22:00:30 +0000 (18:00 -0400)
tests/base/parallel_transform_01.cc
tests/base/parallel_transform_02.cc
tests/base/parallel_transform_03.cc

index 78939f85eff9b03c1b5f42b995a42963434466de..9bf1faf5a966801bdb6bb1427f76edf80d83191c 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <deal.II/lac/vector.h>
 
-#include <boost/lambda/lambda.hpp>
-
 #include "../tests.h"
 
 
@@ -39,7 +37,7 @@ main()
 
   // set y=2*x
   parallel::transform(
-    x.begin(), x.end(), y.begin(), (2 * boost::lambda::_1), 10);
+    x.begin(), x.end(), y.begin(), [](double i) { return 2. * i; }, 10);
 
   // compute y=0 from the previous result
   y -= x;
index f3cfdd4eca9a991dafdd49afa791f1730f556b0a..764746bab1525d8daeae89c813ff3c6d1307f6da 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <deal.II/lac/vector.h>
 
-#include <boost/lambda/lambda.hpp>
-
 #include "../tests.h"
 
 
@@ -45,7 +43,7 @@ main()
                       x.end(),
                       y.begin(),
                       z.begin(),
-                      (boost::lambda::_1 + 2 * boost::lambda::_2),
+                      [](double i, double j) { return i + 2 * j; },
                       10);
 
   Assert(z.l2_norm() == 0, ExcInternalError());
index 741f3eac81240696e2c5f6a735f23d131455e741..2931c4dbe87dd72514b1fc82dfd0d08bbfe961fa 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <deal.II/lac/vector.h>
 
-#include <boost/lambda/lambda.hpp>
-
 #include "../tests.h"
 
 
@@ -48,8 +46,7 @@ main()
                       y.begin(),
                       z.begin(),
                       a.begin(),
-                      (boost::lambda::_1 + boost::lambda::_2 -
-                       boost::lambda::_3),
+                      [](double i, double j, double k) { return i + j - k; },
                       10);
 
   AssertThrow(a.l2_norm() == 0, ExcInternalError());

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.