summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-08-03 14:08:32 -0400
committerBernard Normier <bernard@zeroc.com>2016-08-03 14:08:32 -0400
commitc36d0acbeb23017705a7096dcf97e688c8ec62be (patch)
tree0668919d27c5fdb8c4a4dd9e8e23c99262145990 /cpp/include
parentAdded missing <iterator> (diff)
downloadice-c36d0acbeb23017705a7096dcf97e688c8ec62be.tar.bz2
ice-c36d0acbeb23017705a7096dcf97e688c8ec62be.tar.xz
ice-c36d0acbeb23017705a7096dcf97e688c8ec62be.zip
Fixed C++11 relational operators on ObjectPrx
Removed many useless operator!=
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/Ice/Proxy.h30
-rw-r--r--cpp/include/IceUtil/Thread.h1
2 files changed, 26 insertions, 5 deletions
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index ced24b6bcc9..ef3d22d9deb 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -252,9 +252,8 @@ public:
virtual ~ObjectPrx() = default;
- bool operator==(const ObjectPrx&) const;
- bool operator!=(const ObjectPrx&) const;
- bool operator<(const ObjectPrx&) const;
+ friend ICE_API bool operator<(const ObjectPrx&, const ObjectPrx&);
+ friend ICE_API bool operator==(const ObjectPrx&, const ObjectPrx&);
::std::shared_ptr<::Ice::Communicator> ice_getCommunicator() const;
@@ -654,6 +653,30 @@ private:
IceUtil::Mutex _mutex;
};
+inline bool
+operator>(const ObjectPrx& lhs, const ObjectPrx& rhs)
+{
+ return rhs < lhs;
+}
+
+inline bool
+operator<=(const ObjectPrx& lhs, const ObjectPrx& rhs)
+{
+ return !(lhs > rhs);
+}
+
+inline bool
+operator>=(const ObjectPrx& lhs, const ObjectPrx& rhs)
+{
+ return !(lhs < rhs);
+}
+
+inline bool
+operator!=(const ObjectPrx& lhs, const ObjectPrx& rhs)
+{
+ return !(lhs == rhs);
+}
+
template<typename Prx, typename... Bases>
class Proxy : public virtual Bases...
{
@@ -950,7 +973,6 @@ class ICE_API Object : public ::IceUtil::Shared
public:
bool operator==(const Object&) const;
- bool operator!=(const Object&) const;
bool operator<(const Object&) const;
::Ice::CommunicatorPtr ice_getCommunicator() const;
diff --git a/cpp/include/IceUtil/Thread.h b/cpp/include/IceUtil/Thread.h
index b00b124b895..f1dd851aa84 100644
--- a/cpp/include/IceUtil/Thread.h
+++ b/cpp/include/IceUtil/Thread.h
@@ -128,7 +128,6 @@ public:
ThreadControl getThreadControl() const;
bool operator==(const Thread&) const;
- bool operator!=(const Thread&) const;
bool operator<(const Thread&) const;
//