# std::hash<std::error_code>

> C++ Atlas: `cppatlas.com/w/cpp/error/error_code/hash` | Source: https://en.cppreference.com/w/cpp/error/error_code/hash | Domain: Diagnostics | Standards: C++11

The template specialization of std::hash for std::error_code allows users to obtain hashes of objects of type std::error_code.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <system_error>
template<> struct hash<std::error_code>; // (since C++11)
```

The template specialization of `std::hash` for `std::error_code` allows users to obtain hashes of objects of type `std::error_code`.

---
Attribution: content from https://en.cppreference.com/w/cpp/error/error_code/hash (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.