From a29e64965ccc0ed0032d2fc95839326b372ef8f8 Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Sun, 2 Aug 2015 14:03:35 -0700 Subject: [PATCH] add some basic operators to peer_connection_handle --- include/libtorrent/peer_connection_handle.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/libtorrent/peer_connection_handle.hpp b/include/libtorrent/peer_connection_handle.hpp index 51af70808..75d8559e7 100644 --- a/include/libtorrent/peer_connection_handle.hpp +++ b/include/libtorrent/peer_connection_handle.hpp @@ -108,6 +108,13 @@ struct TORRENT_EXPORT peer_connection_handle time_t last_seen_complete() const; time_point time_of_last_unchoke() const; + bool operator==(peer_connection_handle const& o) const + { return m_connection.lock() == o.m_connection.lock(); } + bool operator!=(peer_connection_handle const& o) const + { return m_connection.lock() != o.m_connection.lock(); } + bool operator<(peer_connection_handle const& o) const + { return m_connection.lock() < o.m_connection.lock(); } + boost::shared_ptr native_handle() const { return m_connection.lock();