This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofNew status.
<coroutine> is freestanding, but usesstd::hash which is notSection: 17.13.2[coroutine.syn]Status:NewSubmitter: Jonathan WakelyOpened: 2021-12-17Last modified: 2025-11-11
Priority:3
View all otherissues in [coroutine.syn].
View all issues withNew status.
Discussion:
The<coroutine> header is required for freestanding implementations, but it defines a specialization ofstd::hash, which is not required for freestanding implementations.
std::hash specialization conditionally present.[2022-01-30; Reflector poll]
Set priority to 3 after reflector poll.Would be resolved byP1642 for C++23,but it's still a defect in C++20.
[2025-11-11; Jonathan adds wording for C++20.]
This wording would resolve the defect for C++20,but the issue should be closed as Resolved in C++23.
Proposed resolution:
This wording is relative to ISO/IEC 14882:2020(E).
template<class P> struct hash<coroutine_handle<P>>;-1-The specialization is enabled (22.10.19[unord.hash])in a hosted implementation.