20#ifndef HASH_MAP_TRAITS_H
21#define HASH_MAP_TRAITS_H
31template <
typename H,
typename Value>
38 template <
typename T>
static inline void remove (T &);
40 template <
typename T>
static inline bool is_empty (
const T &);
41 template <
typename T>
static inline bool is_deleted (
const T &);
42 template <
typename T>
static inline void mark_empty (T &);
46template <
typename H,
typename Value>
53template <
typename H,
typename Value>
58 return H::equal (k1, k2);
61template <
typename H,
typename Value>
66 H::remove (entry.m_key);
67 entry.m_value.~Value ();
70template <
typename H,
typename Value>
75 return H::is_empty (entry.m_key);
78template <
typename H,
typename Value>
83 return H::is_deleted (entry.m_key);
86template <
typename H,
typename Value>
91 H::mark_empty (entry.m_key);
94template <
typename H,
typename Value>
99 H::mark_deleted (entry.m_key);
102template <
typename H,
typename Value>
112template <
typename Key,
typename Value>
117 static hashval_t
hash (
const typename Key::value_type &);
118 static bool equal_keys (
const typename Key::value_type &,
119 const typename Key::compare_type &);
121 template <
typename T>
static inline void remove (T &);
122 static const bool empty_zero_p = default_hash_traits <Value>::empty_zero_p;
123 template <
typename T>
static inline bool is_empty (
const T &);
124 template <
typename T>
static inline bool is_deleted (
const T &);
125 template <
typename T>
static inline void mark_empty (T &);
126 template <
typename T>
static inline void mark_deleted (T &);
129template <
typename Key,
typename Value>
131unbounded_hashmap_traits <Key, Value>
132::hash (
const typename Key::value_type &key)
134 return Key::hash (key);
137template <
typename Key,
typename Value>
139unbounded_hashmap_traits <Key, Value>
140::equal_keys (
const typename Key::value_type &x,
141 const typename Key::compare_type &
y)
143 return Key::equal (x,
y);
146template <
typename Key,
typename Value>
151 default_hash_traits <Value>::remove (entry.m_value);
154template <
typename Key,
typename Value>
159 return default_hash_traits <Value>::is_empty (entry.m_value);
162template <
typename Key,
typename Value>
167 return default_hash_traits <Value>::is_deleted (entry.m_value);
170template <
typename Key,
typename Value>
175 default_hash_traits <Value>::mark_empty (entry.m_value);
178template <
typename Key,
typename Value>
183 default_hash_traits <Value>::mark_deleted (entry.m_value);
190template <
typename Key,
typename Value>
192 = unbounded_hashmap_traits <int_hash_base <Key>, Value>;
Definition hash-map-traits.h:104
static const bool maybe_mx
Definition hash-map-traits.h:105
Definition hash-map-traits.h:33
static const bool maybe_mx
Definition hash-map-traits.h:35
static bool is_empty(const T &)
Definition hash-map-traits.h:73
static void remove(T &)
Definition hash-map-traits.h:64
static void mark_deleted(T &)
Definition hash-map-traits.h:97
static const bool empty_zero_p
Definition hash-map-traits.h:39
static void mark_empty(T &)
Definition hash-map-traits.h:89
H::value_type key_type
Definition hash-map-traits.h:34
static bool is_deleted(const T &)
Definition hash-map-traits.h:81
static bool equal_keys(const key_type &, const key_type &)
Definition hash-map-traits.h:55
static hashval_t hash(const key_type &)
Definition hash-map-traits.h:48
Definition hash-map-traits.h:114
static bool is_empty(const T &)
Definition hash-map-traits.h:157
static const bool empty_zero_p
Definition hash-map-traits.h:122
static void mark_empty(T &)
Definition hash-map-traits.h:173
static bool is_deleted(const T &)
Definition hash-map-traits.h:165
static bool equal_keys(const typename Key::value_type &, const typename Key::compare_type &)
Definition hash-map-traits.h:140
static hashval_t hash(const typename Key::value_type &)
Definition hash-map-traits.h:132
static void remove(T &)
Definition hash-map-traits.h:149
static void mark_deleted(T &)
Definition hash-map-traits.h:181
Key::value_type key_type
Definition hash-map-traits.h:115
const T2 & y
Definition wide-int.h:3870