weak_ptr converting constructor removed; operator< can now take different types to aid ownership tests.

[SVN r16376]
This commit is contained in:
Peter Dimov
2002-11-23 12:47:38 +00:00
parent fadc0716ce
commit 5dd2c62132
3 changed files with 11 additions and 30 deletions
+2 -2
View File
@@ -272,7 +272,7 @@ public:
pn.swap(other.pn);
}
bool _internal_less(this_type const & rhs) const // implementation detail, never throws
template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const
{
return pn < rhs.pn;
}
@@ -321,7 +321,7 @@ template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T>
#endif
template<class T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b)
template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
return a._internal_less(b);
}