Commit 231bd1ca authored by Dominik Charousset's avatar Dominik Charousset

Remove unsafe (and ambiguous) anon_send overload

parent b11bdbb5
......@@ -106,15 +106,6 @@ void anon_send(const Dest& dest, Ts&&... xs) {
std::forward<Ts>(xs)...);
}
/// Anonymously sends `dest` a message.
template <message_priority P = message_priority::normal, class... Ts>
void anon_send(const strong_actor_ptr& dest, Ts&&... xs) {
static_assert(sizeof...(Ts) > 0, "no message to send");
if (dest)
dest->get()->eq_impl(make_message_id(P), nullptr, nullptr,
std::forward<Ts>(xs)...);
}
/// Anonymously sends `dest` an exit message.
template <class Dest>
void anon_send_exit(const Dest& dest, exit_reason reason) {
......
......@@ -154,8 +154,9 @@ void inbound_path::emit_irregular_shutdown(local_actor* self, error reason) {
/// after `self` already terminated and we must not form strong references
/// after that point. Since upstream messages contain the sender address
/// anyway, we only omit redundant information anyways.
anon_send(hdl, make<upstream_msg::forced_drop>(
slots.invert(), self->address(), std::move(reason)));
anon_send(actor_cast<actor>(hdl),
make<upstream_msg::forced_drop>(slots.invert(), self->address(),
std::move(reason)));
}
void inbound_path::emit_irregular_shutdown(local_actor* self,
......@@ -164,8 +165,8 @@ void inbound_path::emit_irregular_shutdown(local_actor* self,
error reason) {
/// Note that we always send abort messages anonymous. See reasoning in first
/// function overload.
anon_send(hdl, make<upstream_msg::forced_drop>(
slots.invert(), self->address(), std::move(reason)));
anon_send(actor_cast<actor>(hdl),
make<upstream_msg::forced_drop>(slots.invert(), self->address(),
std::move(reason)));
}
} // namespace caf
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