+2007-12-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ * wtf/OwnPtr.h:
+ (WTF::operator==): Added.
+ (WTF::operator!=): Added.
+
2007-12-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
template <typename T> inline void swap(OwnPtr<T>& a, OwnPtr<T>& b) { a.swap(b); }
+ template <typename T, typename U> inline bool operator==(const OwnPtr<T>& a, U* b)
+ {
+ return a.get() == b;
+ }
+
+ template <typename T, typename U> inline bool operator==(T* a, const OwnPtr<U>& b)
+ {
+ return a == b.get();
+ }
+
+ template <typename T, typename U> inline bool operator!=(const OwnPtr<T>& a, U* b)
+ {
+ return a.get() != b;
+ }
+
+ template <typename T, typename U> inline bool operator!=(T* a, const OwnPtr<U>& b)
+ {
+ return a != b.get();
+ }
+
template <typename T> inline typename OwnPtr<T>::PtrType getPtr(const OwnPtr<T>& p)
{
return p.get();