std::hash<std::chrono::year_month>
来自cppreference.com
< cpp | chrono | year month
工具库
日期和时间工具
| 时间点 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 时长 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 时钟 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 当天时刻 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 日历 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 时区 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C 风格日期和时间 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::year_month
| 成员函数 | ||||
| 非成员函数 | ||||
| 辅助类 | ||||
|
hash<std::chrono::year_month>
(C++26)
|
|
在标头
<chrono>
定义
|
||
|
template<>
struct
hash<std::chrono::year_month>;
|
(C++26 起) | |
std::hash 对 std::chrono::year_month 的模板特化允许用户获得 std::chrono::year_month 对象的散列值。此特化始终启用。
此特化的 operator() 是 noexcept 的。
注解
| 功能特性测试宏 | 值 | 标准 | 注释 |
|---|---|---|---|
__cpp_lib_chrono
|
202306L | (C++26) | std::chrono 值类的散列支持
|
参阅
|
(C++11)
|
散列函数对象 (类模板) |