Fix the g++ 2.9x operator!= ambiguity.

[SVN r12772]
This commit is contained in:
Peter Dimov
2002-02-09 15:45:29 +00:00
parent 6f7b927641
commit d77b35f333
3 changed files with 22 additions and 30 deletions

View File

@@ -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);