]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a couple of C++20 concepts in parallel.h. 14951/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 22 Mar 2023 23:07:51 +0000 (17:07 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 22 Mar 2023 23:08:00 +0000 (17:08 -0600)
include/deal.II/base/parallel.h

index 4da420b7eb525daaf985c03b8c4a5183fcd44ec3..6ac43510e307e122902ad71c480bf7538b3d3d0f 100644 (file)
@@ -134,9 +134,11 @@ namespace parallel
    */
   template <typename InputIterator, typename OutputIterator, typename Function>
   DEAL_II_CXX20_REQUIRES(
-    (std::invocable<Function, InputIterator> &&
-     std::assignable_from<decltype(*std::declval<OutputIterator>()),
-                          std::invoke_result_t<Function, InputIterator>>))
+    (std::invocable<Function, decltype(*std::declval<InputIterator>())> &&
+     std::assignable_from<
+       decltype(*std::declval<OutputIterator>()),
+       std::invoke_result_t<Function,
+                            decltype(*std::declval<InputIterator>())>>))
   void transform(const InputIterator &begin_in,
                  const InputIterator &end_in,
                  OutputIterator       out,
@@ -196,10 +198,14 @@ namespace parallel
             typename OutputIterator,
             typename Function>
   DEAL_II_CXX20_REQUIRES(
-    (std::invocable<Function, InputIterator1, InputIterator2> &&
+    (std::invocable<Function,
+                    decltype(*std::declval<InputIterator1>()),
+                    decltype(*std::declval<InputIterator2>())> &&
      std::assignable_from<
        decltype(*std::declval<OutputIterator>()),
-       std::invoke_result_t<Function, InputIterator1, InputIterator2>>))
+       std::invoke_result_t<Function,
+                            decltype(*std::declval<InputIterator1>()),
+                            decltype(*std::declval<InputIterator2>())>>))
   void transform(const InputIterator1 &begin_in1,
                  const InputIterator1 &end_in1,
                  InputIterator2        in2,
@@ -262,12 +268,16 @@ namespace parallel
             typename OutputIterator,
             typename Function>
   DEAL_II_CXX20_REQUIRES(
-    (std::invocable<Function, InputIterator1, InputIterator2, InputIterator3> &&
-     std::assignable_from<decltype(*std::declval<OutputIterator>()),
-                          std::invoke_result_t<Function,
-                                               InputIterator1,
-                                               InputIterator2,
-                                               InputIterator3>>))
+    (std::invocable<Function,
+                    decltype(*std::declval<InputIterator1>()),
+                    decltype(*std::declval<InputIterator2>()),
+                    decltype(*std::declval<InputIterator3>())> &&
+     std::assignable_from<
+       decltype(*std::declval<OutputIterator>()),
+       std::invoke_result_t<Function,
+                            decltype(*std::declval<InputIterator1>()),
+                            decltype(*std::declval<InputIterator2>()),
+                            decltype(*std::declval<InputIterator3>())>>))
   void transform(const InputIterator1 &begin_in1,
                  const InputIterator1 &end_in1,
                  InputIterator2        in2,

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.