File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ inline constexpr month December{12};
115115template <>
116116struct hash <chrono::month> {
117117 _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::month& __m) noexcept {
118- return hash< unsigned >{}( static_cast <unsigned >(__m) );
118+ return static_cast <unsigned >(__m);
119119 }
120120};
121121
Original file line number Diff line number Diff line change @@ -166,15 +166,13 @@ inline constexpr weekday Saturday{6};
166166
167167template <>
168168struct hash <chrono::weekday> {
169- _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::weekday& __w) noexcept {
170- return hash<unsigned >{}(__w.c_encoding ());
171- }
169+ _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::weekday& __w) noexcept { return __w.c_encoding (); }
172170};
173171
174172template <>
175173struct hash <chrono::weekday_indexed> {
176174 _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::weekday_indexed& __wi) noexcept {
177- return std::__hash_combine (hash<chrono::weekday>{}(__wi.weekday ()), hash< unsigned >{}( __wi.index () ));
175+ return std::__hash_combine (hash<chrono::weekday>{}(__wi.weekday ()), __wi.index ());
178176 }
179177};
180178
Original file line number Diff line number Diff line change @@ -115,9 +115,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool year::ok() const noexcept {
115115
116116template <>
117117struct hash <chrono::year> {
118- _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::year& __y) noexcept {
119- return hash<int >{}(static_cast <int >(__y));
120- }
118+ _LIBCPP_HIDE_FROM_ABI static size_t operator ()(const chrono::year& __y) noexcept { return static_cast <int >(__y); }
121119};
122120
123121# endif // _LIBCPP_STD_VER >= 26
You can’t perform that action at this time.
0 commit comments