]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explicitly provide template arguments.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 00:47:15 +0000 (17:47 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 00:47:15 +0000 (17:47 -0700)
bundled/taskflow-3.10.0/taskflow/core/async.hpp
bundled/taskflow-3.10.0/taskflow/core/runtime.hpp

index 4e4914406db2af83e81f3e47186f6368bc8b1038..95fd6b055915618ce78de17a3077c6e214a9ee6d 100644 (file)
@@ -210,7 +210,8 @@ auto Executor::dependent_async(P&& params, F&& func, I first, I last) {
   // async without runtime: [] () {}
   else if constexpr(std::is_invocable_v<F>) {
 
-    std::packaged_task p(std::forward<F>(func));
+    using R = std::invoke_result_t<F>;
+    std::packaged_task<R()> p(std::forward<F>(func));
     auto fu{p.get_future()};
 
     AsyncTask task(animate(
index a60d1dc654644c6f929e904d43b08a901ff33afd..2634657af1d3c80a6783112f34b6aeef5b48e6e4 100644 (file)
@@ -552,7 +552,8 @@ auto Executor::_async(P&& params, F&& f, Topology* tpg, Node* parent) {
   }
   // async task with closure: [] () { ... }
   else if constexpr (std::is_invocable_v<F>){
-    std::packaged_task p(std::forward<F>(f));
+    using R = std::invoke_result_t<F>;
+    std::packaged_task<R()> p(std::forward<F>(f));
     auto fu{p.get_future()};
     _schedule_async_task(animate(
       std::forward<P>(params), tpg, parent, 0, 

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.