boost.png (6897 bytes) Home Libraries People FAQ More

PrevUpHomeNext

Struct template hash

boost::hash — An STL compliant hash function object.

Synopsis

template<typename T> 
struct hash : public std::unary_function<T, std::size_t> {
  std::size_t operator()(T const&) const;
};

Description

std::size_t operator()(T const& val) const;

Returns:

hash_value(val)

Notes: The call to hash_value is unqualified, so that custom overloads can be found via argument dependent lookup.
Throws: Only throws if hash_value(T) throws.

Copyright © 2005 Daniel James

PrevUpHomeNext