Add std::hash specializations for shared_ptr, local_shared_ptr, intrusive_ptr

This commit is contained in:
Peter Dimov committed 2020-06-02 05:59:23 +03:00
1 parent 09fdd5ebfd
commit 5a18ffdc56
8 files changed
+303

No files matched your search

+19
View File
@@ -1165,6 +1165,25 @@ template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOO
} // namespace boost
// std::hash
#if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
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
{
return hash_value( v );
}
};
} // namespace std
#endif // #if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
#include <boost/smart_ptr/detail/local_sp_deleter.hpp>
namespace boost