Add hash_value for intrusive_ptr. Refs #6087.

[SVN r75392]
This commit is contained in:
Peter Dimov
2011-11-07 18:46:46 +00:00
parent fbe4ddf4a2
commit e4cb5e131f
3 changed files with 85 additions and 0 deletions

View File

@@ -285,6 +285,15 @@ template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::
#endif // !defined(BOOST_NO_IOSTREAM)
// hash_value
template< class T > struct hash;
template< class T > std::size_t hash_value( boost::intrusive_ptr<T> const & p )
{
return boost::hash< T* >()( p.get() );
}
} // namespace boost
#endif // #ifndef BOOST_SMART_PTR_INTRUSIVE_PTR_HPP_INCLUDED