Home | History | Annotate | Download | only in containers

Lines Matching refs:hash

14 // NOTE: It is an explicit non-goal of this class to provide a generic hash
15 // function for pointers. If you want to hash a pointers to a particular class,
63 // The pre-standard hash behaves like C++11's std::hash, except around pointers.
64 // const char* is specialized to hash the C string and hash functions for
65 // general T* are missing. Define a BASE_HASH_NAMESPACE::hash which aligns with
69 struct hash {
71 return BASE_HASH_IMPL_NAMESPACE::hash<T>()(value);
76 struct hash<T*> {
78 return BASE_HASH_IMPL_NAMESPACE::hash<uintptr_t>()(
83 // The GNU C++ library provides identity hash functions for many integral types,
84 // but not for |long long|. This hash function will truncate if |size_t| is
90 struct hash<integral_type> { \
101 // Implement string hash functions so that strings of various flavors can
102 // be used as keys in STL maps and sets. The hash algorithm comes from the
109 struct hash<string_type> { \
135 class Hash = std::hash<Key>,
138 using hash_map = std::unordered_map<Key, T, Hash, Pred, Alloc>;
141 class Hash = std::hash<Key>,
144 using hash_multimap = std::unordered_multimap<Key, T, Hash, Pred, Alloc>;
147 class Hash = std::hash<Key>,
150 using hash_multiset = std::unordered_multiset<Key, Hash, Pred, Alloc>;
153 class Hash = std::hash<Key>,
156 using hash_set = std::unordered_set<Key, Hash, Pred, Alloc>;
160 // Otherwise, use the pre-standard ones, but override the default hash to match
163 class Hash = BASE_HASH_NAMESPACE::hash<Key>,
166 using hash_map = BASE_HASH_IMPL_NAMESPACE::hash_map<Key, T, Hash, Pred, Alloc>;
169 class Hash = BASE_HASH_NAMESPACE::hash<Key>,
173 BASE_HASH_IMPL_NAMESPACE::hash_multimap<Key, T, Hash, Pred, Alloc>;
176 class Hash = BASE_HASH_NAMESPACE::hash<Key>,
180 BASE_HASH_IMPL_NAMESPACE::hash_multiset<Key, Hash, Pred, Alloc>;
183 class Hash = BASE_HASH_NAMESPACE::hash<Key>,
186 using hash_set = BASE_HASH_IMPL_NAMESPACE::hash_set<Key, Hash, Pred, Alloc>;
193 // When size_t is 32 bits, we turn the 64-bit hash code into 32 bits by using
218 // We use the compound integer hash method to produce a 64-bit hash code, by
270 struct hash<std::pair<Type1, Type2> > {