Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some doxygen warnings
[simgrid.git] / include / xbt / future.hpp
index b7e52e0..a374bec 100644 (file)
@@ -9,18 +9,21 @@
 
 #include <cstddef>
 
-#include <utility>
 #include <exception>
+#include <functional>
 #include <stdexcept>
-
 #include <type_traits>
+#include <utility>
 
 namespace simgrid {
 namespace xbt {
 
-/** A value or an exception
+/** A value or an exception (or nothing)
  *
- *  The API is similar to the one of future and promise.
+ *  This is similar to `optional<expected<T>>`` but it with a Future/Promise
+ *  like API.
+ *
+ *  Also the name is not so great.
  **/
 template<class T>
 class Result {
@@ -115,7 +118,7 @@ public:
 
   /** Extract the value from the future
    *
-   *  After this the value is invalid.
+   *  After this, the value is invalid.
    **/
   T get()
   {
@@ -182,7 +185,7 @@ public:
  *  promise.set_value(code());
  *  </pre>
  *
- *  but it takes care of exceptions and works with void.
+ *  but it takes care of exceptions and works with `void`.
  *
  *  We might need this when working with generic code because
  *  the trivial implementation does not work with `void` (before C++1z).
@@ -215,7 +218,7 @@ auto fulfillPromise(P& promise, F&& code)
   }
 }
 
-/** Set a promise/result from a future/resul
+/** Set a promise/result from a future/result
  *
  *  Roughly this does:
  *