Add ref_compare for weak_ptr. Refs #2849.

[SVN r51979]
This commit is contained in:
Peter Dimov
2009-03-26 00:43:14 +00:00
parent bc50ab0ba3
commit 45a1f1434b
3 changed files with 55 additions and 0 deletions
+9
View File
@@ -48,6 +48,8 @@
namespace boost
{
template<class T> class weak_ptr;
namespace _bi // implementation details
{
@@ -126,6 +128,13 @@ private:
T t_;
};
// ref_compare for weak_ptr
template<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int )
{
return !(a.get() < b.get()) && !(b.get() < a.get());
}
// type
template<class T> class type {};