|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Non-member functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <chrono> | ||
template<class Rep,class Period> struct hash<std::chrono::duration<Rep, Period>>; | (since C++26) | |
The template specialization ofstd::hash forstd::chrono::duration allows users to obtain hashes of objects of typestd::chrono::duration<Rep, Period>. This specialization isenabled if and only if bothstd::hash<Rep> andstd::hash<Period> are enabled.
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_chrono | 202306L | (C++26) | Hashing support forstd::chrono value classes |
(C++11) | hash function object (class template)[edit] |