Files
cppdraft_translate/cppdraft/time/hash.md
2025-10-25 03:02:53 +03:00

3.1 KiB
Raw Blame History

[time.hash]

30 Time library [time]

30.14 Hash support [time.hash]

🔗

template<class Rep, class Period> struct hash<chrono::duration<Rep, Period>>;

1

#

The specialization hash<chrono::duration<Rep, Period>> is enabled ([unord.hash]) if and only if

hash is enabled.

The member functions are not guaranteed to be noexcept.

🔗

template<class Clock, class Duration> struct hash<chrono::time_point<Clock, Duration>>;

2

#

The specialization hash<chrono::time_point<Clock, Duration>> is enabled ([unord.hash]) if and only if hash is enabled.

The member functions are not guaranteed to be noexcept.

🔗

template<> struct hash<chrono::day>; template<> struct hash<chrono::month>; template<> struct hash<chrono::year>; template<> struct hash<chrono::weekday>; template<> struct hash<chrono::weekday_indexed>; template<> struct hash<chrono::weekday_last>; template<> struct hash<chrono::month_day>; template<> struct hash<chrono::month_day_last>; template<> struct hash<chrono::month_weekday>; template<> struct hash<chrono::month_weekday_last>; template<> struct hash<chrono::year_month>; template<> struct hash<chrono::year_month_day>; template<> struct hash<chrono::year_month_day_last>; template<> struct hash<chrono::year_month_weekday>; template<> struct hash<chrono::year_month_weekday_last>;

3

#

The specializations are enabled ([unord.hash]).

[Note 1:

All the hash specializations listed above meet theCpp17Hash requirements, even when called on objects k of type Key such that k.ok() is false.

— end note]

🔗

template<class Duration, class TimeZonePtr> struct hash<chrono::zoned_time<Duration, TimeZonePtr>>;

4

#

The specialization hash<chrono::zoned_time<Duration, TimeZonePtr>> is enabled ([unord.hash]) if and only if hash is enabled andhash is enabled.

The member functions are not guaranteed to be noexcept.

🔗

template<> struct hash<chrono::leap_second>;

5

#

The specialization is enabled ([unord.hash]).