Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable extended warnings when debug is set to false.
[simgrid.git] / include / simgrid / kernel / future.hpp
index a11c8ec..9b6a5fc 100644 (file)
@@ -70,6 +70,8 @@ public:
       // executing it later:
       continuation_ = std::move(continuation);
       break;
+    default:
+      DIE_IMPOSSIBLE;
     }
   }
 
@@ -84,8 +86,8 @@ public:
   }
 
 protected:
-  FutureStateBase() {}
-  ~FutureStateBase() {};
+  FutureStateBase() = default;
+  ~FutureStateBase() = default;
 
   /** Set the future as ready and trigger the continuation */
   void set_ready()
@@ -252,7 +254,7 @@ public:
 template<class T>
 class Future {
 public:
-  Future() {}
+  Future() = default;
   Future(std::shared_ptr<FutureState<T>> state): state_(std::move(state)) {}
 
   // Move type:
@@ -261,7 +263,8 @@ public:
   Future(Future&& that) : state_(std::move(that.state_)) {}
   Future& operator=(Future&& that)
   {
-    state_ = std::move(that.stat_);
+    state_ = std::move(that.state_);
+    return *this;
   }
 
   /** Whether the future is valid:.