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>
This commit is contained in:
Tom Tromey
2025-03-11 09:28:42 -06:00
parent 0a15ae610a
commit 5cac5ee6be

View 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 *>>