Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template hash_value

boost::movelib::hash_value

Synopsis

// In header: <boost/move/unique_ptr.hpp>


template<typename T, typename D> 
  std::size_t hash_value(const unique_ptr< T, D > & x);

Description

Returns: boost::hash<typename unique_ptr<T, D>::pointer>()(x.get()), the same value as std::hash gives for std::unique_ptr. boost::hash and the containers that use it (e.g. Boost.Unordered) find this function with argument-dependent lookup.

Note: This header does not include Boost.ContainerHash, so a direct call to this function requires the definition of boost::hash (boost/container_hash/hash.hpp).


PrevUpHomeNext