Add owner_equals

This commit is contained in:
Peter Dimov
2020-05-31 21:41:06 +03:00
parent 62b0e5cdf4
commit 58915ca2fe
4 changed files with 134 additions and 0 deletions
+10
View File
@@ -237,6 +237,16 @@ public:
return pn < rhs.pn;
}
template<class Y> bool owner_equals( weak_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn == rhs.pn;
}
template<class Y> bool owner_equals( shared_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn == rhs.pn;
}
// Tasteless as this may seem, making all members public allows member templates
// to work in the absence of member template friends. (Matthew Langston)