Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use std::future_error.
[simgrid.git] / include / xbt / future.hpp
index 95ab69d..31870ce 100644 (file)
@@ -12,6 +12,7 @@
 #include <boost/variant.hpp>
 #include <exception>
 #include <functional>
+#include <future> // std::future_error
 #include <stdexcept>
 #include <type_traits>
 #include <utility>
@@ -66,7 +67,7 @@ public:
         break;
       }
       default:
-        throw std::logic_error("Invalid result");
+        throw std::future_error(std::future_errc::no_state);
     }
   }
 private: