名稱空間
變體
操作

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

來自 cppreference.com
< cpp‎ | chrono‎ | year
 
 
 
 
定義於標頭檔案 <chrono>
template<> struct hash<std::chrono::year>;
(C++26 起)

std::hashstd::chrono::year 特化允許使用者獲取 std::chrono::year 型別物件的雜湊值。此特化已啟用

此特化的 operator()noexcept 的。

[編輯] 註解

特性測試 標準 特性
__cpp_lib_chrono 202306L (C++26) std::chrono 值類的 雜湊 支援

[編輯] 參閱

(C++11)
雜湊函式物件
(類模板) [編輯]