std:: hash <std::chrono::duration>
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Non-member functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
定义于头文件
<chrono>
|
||
|
template
<
class
Rep,
class
Period
>
struct hash < std:: chrono :: duration < Rep, Period >> ; |
(C++26 起) | |
针对 std::chrono::duration 的 std::hash 模板特化允许用户获取 std:: chrono :: duration < Rep, Period > 类型对象的哈希值。该特化仅在 std:: hash < Rep > 与 std:: hash < Period > 均被启用时 生效 。
注释
| 功能测试 宏 | 值 | 标准 | 功能 |
|---|---|---|---|
__cpp_lib_chrono
|
202306L
|
(C++26) |
哈希
支持
std::chrono
值类
|
参见
|
(C++11)
|
哈希函数对象
(类模板) |