std:: hash <std::coroutine_handle>
From cppreference.net
<
cpp
|
coroutine
|
coroutine handle
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coroutine support
| Coroutine traits | ||||
|
(C++20)
|
||||
| Coroutine handle | ||||
|
(C++20)
|
||||
| No-op coroutines | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Trivial awaitables | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Range generators | ||||
|
(C++23)
|
std::coroutine_handle
| Member functions | ||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
hash
<std::coroutine_handle>
|
|
定义于头文件
<coroutine>
|
||
|
template
<
class
Promise
>
struct hash < std:: coroutine_handle < Promise >> ; |
(C++20 起) | |
针对 std::hash 的模板特化版本 std::coroutine_handle 允许用户获取类型为 std:: coroutine_handle < P > 对象的哈希值。
operator()
特化的 noexcept 属性保持不变。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++11)
|
哈希函数对象
(类模板) |