Index: Source/wtf/PassRefPtr.h |
diff --git a/Source/wtf/PassRefPtr.h b/Source/wtf/PassRefPtr.h |
index 1d21a538bf53329ca589d9de5783c4c86d614c51..821de5b29a221e6889f004180bb260f423a1a5b7 100644 |
--- a/Source/wtf/PassRefPtr.h |
+++ b/Source/wtf/PassRefPtr.h |
@@ -138,6 +138,16 @@ namespace WTF { |
return a == b.get(); |
} |
+ template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const U& b) |
+ { |
+ return a.get() == &b; |
+ } |
+ |
+ template<typename T, typename U> inline bool operator==(const T& a, const PassRefPtr<U>& b) |
+ { |
+ return &a == b.get(); |
+ } |
+ |
template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const RawPtr<U>& b) |
{ |
return a.get() == b.get(); |
@@ -173,6 +183,16 @@ namespace WTF { |
return a != b.get(); |
} |
+ template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const U& b) |
+ { |
+ return a.get() != &b; |
+ } |
+ |
+ template<typename T, typename U> inline bool operator!=(const T& a, const PassRefPtr<U>& b) |
+ { |
+ return &a != b.get(); |
+ } |
+ |
template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const RawPtr<U>& b) |
{ |
return a.get() != b.get(); |