Do not require boost::hash in the std::hash specializations

This commit is contained in:
Peter Dimov
2020-06-03 17:38:03 +03:00
parent 688cfed63e
commit bc677e9098
6 changed files with 20 additions and 44 deletions
+2 -2
View File
@@ -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() );
}
};
+2 -2
View File
@@ -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() );
}
};
+2 -2
View File
@@ -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() );
}
};