]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove std::hash specialization
authorTom Tromey <tom@tromey.com>
Tue, 11 Mar 2025 15:28:42 +0000 (09:28 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 14 Mar 2025 17:13:49 +0000 (11:13 -0600)
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>
gdb/dictionary.c

index 6925ad4d46ce4067feae18d5796f9e802f79e830..f617b8f967f87b9c177d5470158b02c91986e531 100644 (file)
@@ -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 *>>