diff options
author | Tom Tromey <tom@tromey.com> | 2025-03-11 09:28:42 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2025-03-14 11:13:49 -0600 |
commit | 5cac5ee6be6a4c5668b119c0e2967a5967ba6b35 (patch) | |
tree | 7e714e52cc9a9ca700f9a259bf99a7b3b3ad7d7b | |
parent | 0a15ae610a313fe2d2c1a4b435d952888b6b5639 (diff) | |
download | binutils-5cac5ee6be6a4c5668b119c0e2967a5967ba6b35.zip binutils-5cac5ee6be6a4c5668b119c0e2967a5967ba6b35.tar.gz binutils-5cac5ee6be6a4c5668b119c0e2967a5967ba6b35.tar.bz2 |
Remove std::hash specialization
C++11 initially omitted specialization of std::hash for enumeration
types, but this was rectified in LWG issue 2148. This patch removes a
redundant specialization. Tested by rebuilding.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
-rw-r--r-- | gdb/dictionary.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 6925ad4..f617b8f 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -915,23 +915,6 @@ struct multidictionary unsigned short n_allocated_dictionaries; }; -/* A hasher for enum language. Injecting this into std is a convenience - when using unordered_map with C++11. */ - -namespace std -{ - template<> struct hash<enum language> - { - typedef enum language argument_type; - typedef std::size_t result_type; - - result_type operator() (const argument_type &l) const noexcept - { - return static_cast<result_type> (l); - } - }; -} /* namespace std */ - /* A helper function to collate symbols on the pending list by language. */ static std::unordered_map<enum language, std::vector<symbol *>> |