Commit ea9114c1 authored by Dominik Charousset's avatar Dominik Charousset

Fix dispatching in response promises

parent e3c1467a
......@@ -41,11 +41,11 @@ public:
return static_cast<bool>(promise_);
}
void deliver(Ts... what) const {
promise_.deliver(make_message(std::move(what)...));
template <class... Us>
void deliver(Us&&... xs) const {
promise_.deliver(make_message(std::forward<Us>(xs)...));
}
private:
response_promise promise_;
};
......@@ -66,11 +66,12 @@ public:
return static_cast<bool>(promise_);
}
void deliver(either_or_t<L, R> what) const {
promise_.deliver(what.value);
template <class... Ts>
void deliver(Ts&&... xs) const {
either_or_t<L, R> tmp{std::forward<Ts>(xs)...};
promise_.deliver(std::move(tmp.value));
}
private:
response_promise promise_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment