Merge [76111] to release. Fixes #2603.

[SVN r76163]
This commit is contained in:
Peter Dimov
2011-12-26 00:23:00 +00:00
parent 9147489b4c
commit b9970eda45
5 changed files with 139 additions and 4 deletions

View File

@@ -449,7 +449,12 @@ public:
pn.swap(other.pn);
}
template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const
template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
{
return pn < rhs.pn;
}
template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
{
return pn < rhs.pn;
}
@@ -505,7 +510,7 @@ template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T>
template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
return a._internal_less(b);
return a.owner_before( b );
}
template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)