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:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user