mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 09:30:45 +00:00
Implement missing promise<> move assignment
This commit is contained in:
14
reactor.hh
14
reactor.hh
@@ -236,7 +236,12 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
promise& operator=(promise&&);
|
||||
promise& operator=(promise&& x) {
|
||||
this->~promise();
|
||||
_state = x._state;
|
||||
x._state = nullptr;
|
||||
return *this;
|
||||
}
|
||||
void operator=(const promise&) = delete;
|
||||
future<T> get_future();
|
||||
void set_value(const T& result) { _state->set(result); }
|
||||
@@ -258,7 +263,12 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
promise& operator=(promise&&);
|
||||
promise& operator=(promise&& x) {
|
||||
this->~promise();
|
||||
_state = x._state;
|
||||
x._state = nullptr;
|
||||
return *this;
|
||||
}
|
||||
void operator=(const promise&) = delete;
|
||||
future<void> get_future();
|
||||
void set_value() { _state->set(); }
|
||||
|
||||
Reference in New Issue
Block a user