Add operator less because widely used
author |
David Demelier <markand@malikania.fr> |
date |
Thu, 12 Sep 2013 11:44:34 +0200 |
parents |
18ad49172e6c |
children |
73d8f140bc86 |
files |
C++/Socket.cpp C++/Socket.h |
diffstat |
2 files changed, 7 insertions(+), 0 deletions(-)
[+]
|
line diff
--- a/C++/Socket.cpp Thu Sep 12 11:23:08 2013 +0200
+++ b/C++/Socket.cpp Thu Sep 12 11:44:34 2013 +0200
@@ -264,3 +264,8 @@
{
return s1.getSocket() == s2.getSocket();
}
+
+bool operator<(const Socket &s, const Socket &s2)
+{
+ return s1.getSocket() < s2.getSocket();
+}
--- a/C++/Socket.h Thu Sep 12 11:23:08 2013 +0200
+++ b/C++/Socket.h Thu Sep 12 11:44:34 2013 +0200
@@ -282,4 +282,6 @@
bool operator==(const Socket &s1, const Socket &s2);
+bool operator<(const Socket &s, const Socket &s2);
+
#endif // !_SOCKET_H_