Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[xbt] Forgot to properly return the return value in Task
[simgrid.git] / include / xbt / functional.hpp
index 2429b5b..5f530ea 100644 (file)
@@ -240,7 +240,7 @@ private:
       [](TaskUnion& buffer, Args... args) -> R {
         // Delete F when we go out of scope:
         std::unique_ptr<F> code(*reinterpret_cast<F**>(&buffer));
       [](TaskUnion& buffer, Args... args) -> R {
         // Delete F when we go out of scope:
         std::unique_ptr<F> code(*reinterpret_cast<F**>(&buffer));
-        (*code)(std::forward<Args>(args)...);
+        return (*code)(std::forward<Args>(args)...);
       },
       // Destroy:
       [](TaskUnion& buffer) {
       },
       // Destroy:
       [](TaskUnion& buffer) {