Skip to content

Commit

Permalink
has overload for year
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Mar 8, 2024
1 parent 2936c2d commit 801eeb8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions include/infra/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,20 @@ class ScopedDurationLog
#endif

}

#ifndef HAVE_CPP_CHRONO

#include <functional>

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

#endif

0 comments on commit 801eeb8

Please sign in to comment.