Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
netcards were renamed to netpoints recently
[simgrid.git] / include / xbt / functional.hpp
index 2429b5b..7596ef6 100644 (file)
@@ -78,7 +78,7 @@ constexpr auto apply(F&& f, Tuple&& t, simgrid::xbt::index_sequence<I...>)
  *
  *  auto args = std::make_tuple(1, false);
  *  int res = apply(foo, args);
- *  @encode
+ *  @endcode
  **/
 template <class F, class Tuple>
 constexpr auto apply(F&& f, Tuple&& t)
@@ -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));
-        (*code)(std::forward<Args>(args)...);
+        return (*code)(std::forward<Args>(args)...);
       },
       // Destroy:
       [](TaskUnion& buffer) {