# std::hash<std::coroutine_handle>

> C++ Atlas: `cppatlas.com/w/cpp/coroutine/coroutine_handle/hash` | Source: https://en.cppreference.com/w/cpp/coroutine/coroutine_handle/hash | Domain: Coroutine support | Standards: C++11, C++20

The template specialization of std::hash for std::coroutine_handle allows users to obtain hashes of objects of type std::coroutine_handle<P>.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <coroutine>

template< class Promise >
struct hash<std::coroutine_handle<Promise>>; // (since C++20)
```

The template specialization of `std::hash` for `std::coroutine_handle` allows users to obtain hashes of objects of type `std::coroutine_handle<P>`.

`operator()` of the specialization is noexcept.

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`hash`](https://en.cppreference.com/w/cpp/utility/hash) (C++11): hash function object (class template)

---
Attribution: content from https://en.cppreference.com/w/cpp/coroutine/coroutine_handle/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.