]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use assignable_from instead of convertible_to concepts in parallel.h. 14933/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 21 Mar 2023 19:33:37 +0000 (13:33 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 21 Mar 2023 19:33:37 +0000 (13:33 -0600)
include/deal.II/base/parallel.h

index 106493dfe0b0713897f9f857257d2f247b62a9a0..4da420b7eb525daaf985c03b8c4a5183fcd44ec3 100644 (file)
@@ -135,8 +135,8 @@ namespace parallel
   template <typename InputIterator, typename OutputIterator, typename Function>
   DEAL_II_CXX20_REQUIRES(
     (std::invocable<Function, InputIterator> &&
-     std::convertible_to<std::invoke_result_t<Function, InputIterator>,
-                         decltype(*std::declval<OutputIterator>())>))
+     std::assignable_from<decltype(*std::declval<OutputIterator>()),
+                          std::invoke_result_t<Function, InputIterator>>))
   void transform(const InputIterator &begin_in,
                  const InputIterator &end_in,
                  OutputIterator       out,
@@ -197,9 +197,9 @@ namespace parallel
             typename Function>
   DEAL_II_CXX20_REQUIRES(
     (std::invocable<Function, InputIterator1, InputIterator2> &&
-     std::convertible_to<
-       std::invoke_result_t<Function, InputIterator1, InputIterator2>,
-       decltype(*std::declval<OutputIterator>())>))
+     std::assignable_from<
+       decltype(*std::declval<OutputIterator>()),
+       std::invoke_result_t<Function, InputIterator1, InputIterator2>>))
   void transform(const InputIterator1 &begin_in1,
                  const InputIterator1 &end_in1,
                  InputIterator2        in2,
@@ -263,11 +263,11 @@ namespace parallel
             typename Function>
   DEAL_II_CXX20_REQUIRES(
     (std::invocable<Function, InputIterator1, InputIterator2, InputIterator3> &&
-     std::convertible_to<std::invoke_result_t<Function,
-                                              InputIterator1,
-                                              InputIterator2,
-                                              InputIterator3>,
-                         decltype(*std::declval<OutputIterator>())>))
+     std::assignable_from<decltype(*std::declval<OutputIterator>()),
+                          std::invoke_result_t<Function,
+                                               InputIterator1,
+                                               InputIterator2,
+                                               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.