comparison gcc/hash-traits.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Traits for hashable types. 1 /* Traits for hashable types.
2 Copyright (C) 2014-2018 Free Software Foundation, Inc. 2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
86 typedef Type compare_type; 86 typedef Type compare_type;
87 87
88 static inline hashval_t hash (value_type); 88 static inline hashval_t hash (value_type);
89 static inline bool equal (value_type existing, value_type candidate); 89 static inline bool equal (value_type existing, value_type candidate);
90 static inline void mark_deleted (Type &); 90 static inline void mark_deleted (Type &);
91 static const bool empty_zero_p = Empty == 0;
91 static inline void mark_empty (Type &); 92 static inline void mark_empty (Type &);
92 static inline bool is_deleted (Type); 93 static inline bool is_deleted (Type);
93 static inline bool is_empty (Type); 94 static inline bool is_empty (Type);
94 }; 95 };
95 96
148 149
149 static inline hashval_t hash (const value_type &); 150 static inline hashval_t hash (const value_type &);
150 static inline bool equal (const value_type &existing, 151 static inline bool equal (const value_type &existing,
151 const compare_type &candidate); 152 const compare_type &candidate);
152 static inline void mark_deleted (Type *&); 153 static inline void mark_deleted (Type *&);
154 static const bool empty_zero_p = true;
153 static inline void mark_empty (Type *&); 155 static inline void mark_empty (Type *&);
154 static inline bool is_deleted (Type *); 156 static inline bool is_deleted (Type *);
155 static inline bool is_empty (Type *); 157 static inline bool is_empty (Type *);
156 }; 158 };
157 159
321 323
322 static inline hashval_t hash (const value_type &); 324 static inline hashval_t hash (const value_type &);
323 static inline bool equal (const value_type &, const compare_type &); 325 static inline bool equal (const value_type &, const compare_type &);
324 static inline void remove (value_type &); 326 static inline void remove (value_type &);
325 static inline void mark_deleted (value_type &); 327 static inline void mark_deleted (value_type &);
328 static const bool empty_zero_p = T1::empty_zero_p;
326 static inline void mark_empty (value_type &); 329 static inline void mark_empty (value_type &);
327 static inline bool is_deleted (const value_type &); 330 static inline bool is_deleted (const value_type &);
328 static inline bool is_empty (const value_type &); 331 static inline bool is_empty (const value_type &);
329 }; 332 };
330 333