summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/include/Ice/Proxy.h58
-rw-r--r--cpp/include/Ice/ProxyHandle.h57
2 files changed, 58 insertions, 57 deletions
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index e3f8902ea98..8e11ab12492 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -419,6 +419,64 @@ namespace IceInternal
{
//
+// Inline comparison functions for proxies
+//
+template<typename T, typename U>
+inline bool operator==(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ ::IceProxy::Ice::Object* l = upCast(lhs.get());
+ ::IceProxy::Ice::Object* r = upCast(rhs.get());
+ if(l && r)
+ {
+ return *l == *r;
+ }
+ else
+ {
+ return !l && !r;
+ }
+}
+
+template<typename T, typename U>
+inline bool operator!=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ return !operator==(lhs, rhs);
+}
+
+template<typename T, typename U>
+inline bool operator<(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ ::IceProxy::Ice::Object* l = upCast(lhs.get());
+ ::IceProxy::Ice::Object* r = upCast(rhs.get());
+ if(l && r)
+ {
+ return *l < *r;
+ }
+ else
+ {
+ return !l && r;
+ }
+}
+
+template<typename T, typename U>
+inline bool operator<=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ return lhs < rhs || lhs == rhs;
+}
+
+template<typename T, typename U>
+inline bool operator>(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ return !(lhs < rhs || lhs == rhs);
+}
+
+template<typename T, typename U>
+inline bool operator>=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
+{
+ return !(lhs < rhs);
+}
+
+
+//
// checkedCast and uncheckedCast functions without facet:
//
template<typename P> P
diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h
index b1873506771..aba496dd370 100644
--- a/cpp/include/Ice/ProxyHandle.h
+++ b/cpp/include/Ice/ProxyHandle.h
@@ -277,63 +277,6 @@ public:
}
};
-//
-// Inline comparison functions for proxies
-//
-
-template<typename T, typename U>
-inline bool operator==(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- ::IceProxy::Ice::Object* l = upCast(lhs.get());
- ::IceProxy::Ice::Object* r = upCast(rhs.get());
- if(l && r)
- {
- return *l == *r;
- }
- else
- {
- return !l && !r;
- }
-}
-
-template<typename T, typename U>
-inline bool operator!=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- return !operator==(lhs, rhs);
-}
-
-template<typename T, typename U>
-inline bool operator<(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- ::IceProxy::Ice::Object* l = upCast(lhs.get());
- ::IceProxy::Ice::Object* r = upCast(rhs.get());
- if(l && r)
- {
- return *l < *r;
- }
- else
- {
- return !l && r;
- }
-}
-
-template<typename T, typename U>
-inline bool operator<=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- return lhs < rhs || lhs == rhs;
-}
-
-template<typename T, typename U>
-inline bool operator>(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- return !(lhs < rhs || lhs == rhs);
-}
-
-template<typename T, typename U>
-inline bool operator>=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
-{
- return !(lhs < rhs);
-}
}