Commit f616740d authored by Dominik Charousset's avatar Dominik Charousset

provide std::hash specialization for actor_ptr

parent 6d0030bb
...@@ -700,4 +700,13 @@ inline actor_ptr remote_actor(const std::string& host, std::uint16_t port) { ...@@ -700,4 +700,13 @@ inline actor_ptr remote_actor(const std::string& host, std::uint16_t port) {
} // namespace cppa } // namespace cppa
namespace std {
template<>
struct hash<cppa::actor_ptr> {
inline size_t operator()(const cppa::actor_ptr& ptr) const {
return (ptr) ? static_cast<size_t>(ptr->id()) : 0;
}
};
} // namespace std
#endif // CPPA_HPP #endif // CPPA_HPP
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