Namespaces
Variants

std:: hash <std::chrono::year>

From cppreference.net
定义于头文件 <chrono>
template <> struct hash < std:: chrono :: year > ;
(C++26 起)

针对 std::chrono::year std::hash 模板特化允许用户获取 std:: chrono :: year 类型对象的哈希值。该特化已 启用

此特化的 operator ( ) noexcept

注释

功能测试 标准 功能
__cpp_lib_chrono 202306L (C++26) 哈希 支持 std::chrono 值类

参见

(C++11)
哈希函数对象
(类模板)