mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-11 23:15:27 +02:00
Fix the g++ 2.9x operator!= ambiguity.
[SVN r12772]
This commit is contained in:
@@ -164,6 +164,17 @@ template<class T, class U> inline bool operator!=(weak_ptr<T> const & a, weak_pt
|
||||
return a.get() != b.get();
|
||||
}
|
||||
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
|
||||
|
||||
// Resolve the ambiguity between our op!= and the one in rel_ops
|
||||
|
||||
template<typename T> inline bool operator!=(weak_ptr<T> const & a, weak_ptr<T> const & b)
|
||||
{
|
||||
return a.get() != b.get();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class T> inline bool operator<(weak_ptr<T> const & a, weak_ptr<T> const & b)
|
||||
{
|
||||
return a.less(b);
|
||||
|
Reference in New Issue
Block a user