class template specialization
<system_error>

std::hash<error_code>

template <class T> struct hash;          // unspecializedtemplate <> struct hash <error_code>;    // error_code
Hash for error_code
Unary function object class that defines the hash specialization for error_code.

The functional call returns a hash value based on the error code: A hash value is a value that depends solely on its argument, returning always the same value for the same argument (for a given program execution). The value returned shall have a small likelihood of being the same as the one returned for a different argument (with chances of collision approaching 1/numeric_limits<size_t>::max).

This allows the use of error_code objects as keys for unordered containers (like unordered_set or unordered_map).

See hash for additional information.

Member functions

operator()
Returns a hash value for its argument, as a value of type size_t.
size_t is an unsigned integral type.