Add #ifndef's around the comparison operator's against const T* now that the

implicit cast operator has been added.
This commit is contained in:
Robert Osfield
2003-03-06 10:38:31 +00:00
parent 63df52d408
commit b70c80ba39

View File

@@ -55,26 +55,17 @@ class ref_ptr
return *this;
}
#ifndef AUTOMATIC_CAST_TO_POINTER
inline bool operator == (const ref_ptr& rp) const
{
return (_ptr==rp._ptr);
}
inline bool operator == (const T* ptr) const
{
return (_ptr==ptr);
}
inline bool operator != (const ref_ptr& rp) const
{
return (_ptr!=rp._ptr);
}
inline bool operator != (const T* ptr) const
{
return (_ptr!=ptr);
}
inline bool operator < (const ref_ptr& rp) const
{
return (_ptr<rp._ptr);
@@ -85,10 +76,27 @@ class ref_ptr
return (_ptr>rp._ptr);
}
inline bool operator == (const T* ptr) const
{
return (_ptr==ptr);
}
inline bool operator != (const T* ptr) const
{
return (_ptr!=ptr);
}
inline bool operator < (const T* ptr) const
{
return (_ptr<ptr);
}
inline bool operator > (const T* ptr) const
{
return (_ptr>ptr);
}
#endif
inline T& operator*() { return *_ptr; }