Commit f40c9f16 authored by Dominik Charousset's avatar Dominik Charousset

disambiguation for operator==(self_type,actor_ptr)

parent 492673e1
......@@ -146,6 +146,12 @@ class scoped_self_setter {
};
// disambiguation (compiler gets confused with cast operator otherwise)
bool operator==(const actor_ptr& lhs, const self_type& rhs);
bool operator==(const self_type& lhs, const actor_ptr& rhs);
bool operator!=(const actor_ptr& lhs, const self_type& rhs);
bool operator!=(const self_type& lhs, const actor_ptr& rhs);
#endif // CPPA_DOCUMENTATION
} // namespace cppa
......
......@@ -96,14 +96,6 @@ void tss_reset(local_actor* ptr, bool inc_ref_count = true) {
} // namespace <anonymous>
bool operator==(const actor_ptr& lhs, const self_type& rhs) {
return lhs.get() == rhs.get();
}
bool operator!=(const self_type& lhs, const actor_ptr& rhs) {
return lhs.get() != rhs.get();
}
void self_type::cleanup_fun(cppa::local_actor* what) {
if (what) {
auto ptr = dynamic_cast<thread_mapped_actor*>(what);
......@@ -139,4 +131,20 @@ self_type::pointer self_type::release_impl() {
return tss_release();
}
bool operator==(const actor_ptr& lhs, const self_type& rhs) {
return lhs.get() == rhs.get();
}
bool operator==(const self_type& lhs, const actor_ptr& rhs) {
return rhs == lhs;
}
bool operator!=(const actor_ptr& lhs, const self_type& rhs) {
return !(lhs == rhs);
}
bool operator!=(const self_type& lhs, const actor_ptr& rhs) {
return !(rhs == lhs);
}
} // namespace cppa
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