Skip to content

Commit

Permalink
Improve chrono::year hash condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Apr 16, 2024
1 parent 3d30c9d commit affb2a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/infra/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,14 @@ class ScopedDurationLog

}

#ifndef HAVE_CPP20_CHRONO

#if __cplusplus < 202600L
#include <functional>

namespace std {
template <>
struct hash<date::year>
struct hash<inf::chrono::year>
{
size_t operator()(const date::year& x) const
size_t operator()(const inf::chrono::year& x) const
{
return static_cast<int32_t>(x);
}
Expand Down

0 comments on commit affb2a8

Please sign in to comment.