forked from boostorg/smart_ptr
Do not require boost::hash in the std::hash specializations
This commit is contained in:
@@ -394,9 +394,9 @@ namespace std
|
||||
|
||||
template<class T> struct hash< ::boost::intrusive_ptr<T> >
|
||||
{
|
||||
std::size_t operator()( ::boost::intrusive_ptr<T> const & v ) const BOOST_SP_NOEXCEPT
|
||||
std::size_t operator()( ::boost::intrusive_ptr<T> const & p ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return hash_value( v );
|
||||
return std::hash< T* >()( p.get() );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -697,9 +697,9 @@ namespace std
|
||||
|
||||
template<class T> struct hash< ::boost::local_shared_ptr<T> >
|
||||
{
|
||||
std::size_t operator()( ::boost::local_shared_ptr<T> const & v ) const BOOST_SP_NOEXCEPT
|
||||
std::size_t operator()( ::boost::local_shared_ptr<T> const & p ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return hash_value( v );
|
||||
return std::hash< typename ::boost::local_shared_ptr<T>::element_type* >()( p.get() );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1174,9 +1174,9 @@ namespace std
|
||||
|
||||
template<class T> struct hash< ::boost::shared_ptr<T> >
|
||||
{
|
||||
std::size_t operator()( ::boost::shared_ptr<T> const & v ) const BOOST_SP_NOEXCEPT
|
||||
std::size_t operator()( ::boost::shared_ptr<T> const & p ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return hash_value( v );
|
||||
return std::hash< typename ::boost::shared_ptr<T>::element_type* >()( p.get() );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user