/** * Hashes the Struct type. * @param type The type to hash. * @return Returns the hash value for the type. */ size_t operator()(puppet::runtime::types::basic_struct<Type> const& type) const { size_t seed = 0; hash_combine(seed, puppet::runtime::types::basic_struct<Type>::name()); hash_range(seed, type.types().begin(), type.types().end()); return seed; }
std::size_t hash_value(std::vector<T, A> const& v) { return hash_range(v.begin(), v.end()); }
std::size_t hash_value(std::multimap<K, T, C, A> const& v) { return hash_range(v.begin(), v.end()); }
std::size_t hash_value(std::set<K, C, A> const& v) { return hash_range(v.begin(), v.end()); }
boost::uint64_t bag::hash(boost::uint64_t seed) const { return hash_range(m_value.begin(), m_value.end(), seed); }
boost::uint64_t tuple::hash(boost::uint64_t seed) const { return hash_range(m_value, m_value + m_size, seed); }
/** * Hashes the given hash type. * @param hash The hash type to hash. * @return Returns the hash value for the hash type. */ size_t operator()(puppet::runtime::values::basic_hash<Value> const& hash) const { return hash_range(hash.begin(), hash.end()); }
static std::size_t compute_hash(const char* str,std::size_t off) { std::size_t len=std::strlen(str); if(off>len)off=len; return hash_range(str+off,str+len); }