Skip to content

Commit 152b3dc

Browse files
committed
Identity for hash<day>
1 parent 5939a5e commit 152b3dc

File tree

1 file changed

+1
-3
lines changed
  • libcxx/include/__chrono

1 file changed

+1
-3
lines changed

libcxx/include/__chrono/day.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr day& day::operator-=(const days& __dd) no
9898

9999
template <>
100100
struct hash<chrono::day> {
101-
_LIBCPP_HIDE_FROM_ABI static size_t operator()(const chrono::day& __d) noexcept {
102-
return hash<unsigned>{}(static_cast<unsigned>(__d));
103-
}
101+
_LIBCPP_HIDE_FROM_ABI static size_t operator()(const chrono::day& __d) noexcept { return static_cast<unsigned>(__d); }
104102
};
105103

106104
# endif // _LIBCPP_STD_VER >= 26

0 commit comments

Comments
 (0)