]> https://gitweb.dealii.org/ - dealii.git/commitdiff
parallel::transform() fix iterator type 17844/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 5 Nov 2024 21:50:40 +0000 (16:50 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 5 Nov 2024 21:50:40 +0000 (16:50 -0500)
include/deal.II/base/parallel.h

index d22c8ad696eec4470cf2295acda1feeea7920f20..8e38e803cafe165557f59024c43e266ecdf84220 100644 (file)
@@ -173,7 +173,7 @@ namespace parallel
     // warnings about unused arguments
     (void)grainsize;
 
-    for (OutputIterator in = begin_in; in != end_in;)
+    for (InputIterator in = begin_in; in != end_in;)
       *out++ = function(*in++);
 #else
     using Iterators     = std::tuple<InputIterator, OutputIterator>;
@@ -249,7 +249,7 @@ namespace parallel
     // warnings about unused arguments
     (void)grainsize;
 
-    for (OutputIterator in1 = begin_in1; in1 != end_in1;)
+    for (InputIterator in1 = begin_in1; in1 != end_in1;)
       *out++ = function(*in1++, *in2++);
 #else
     using Iterators =
@@ -332,7 +332,7 @@ namespace parallel
     // warnings about unused arguments
     (void)grainsize;
 
-    for (OutputIterator in1 = begin_in1; in1 != end_in1;)
+    for (InputIterator in1 = begin_in1; in1 != end_in1;)
       *out++ = function(*in1++, *in2++, *in3++);
 #else
     using Iterators = std::

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.