mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-05 04:01:04 +02:00
Fix the g++ 2.9x operator!= ambiguity.
[SVN r12772]
This commit is contained in:
@@ -225,6 +225,17 @@ template<typename T, typename U> inline bool operator!=(shared_ptr<T> const & a,
|
||||
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!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
|
||||
{
|
||||
return a.get() != b.get();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b)
|
||||
{
|
||||
return std::less<T*>()(a.get(), b.get());
|
||||
|
Reference in New Issue
Block a user