From: Tom Tromey Date: Tue, 11 Mar 2025 15:28:42 +0000 (-0600) Subject: Remove std::hash specialization X-Git-Tag: binutils-2_45~1173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cac5ee6be6a4c5668b119c0e2967a5967ba6b35;p=thirdparty%2Fbinutils-gdb.git 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 --- diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 6925ad4d46c..f617b8f967f 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 - { - typedef enum language argument_type; - typedef std::size_t result_type; - - result_type operator() (const argument_type &l) const noexcept - { - return static_cast (l); - } - }; -} /* namespace std */ - /* A helper function to collate symbols on the pending list by language. */ static std::unordered_map>