[libcxx-commits] [libcxx] [libc++][chrono] P2592R3: Hashing for chrono (PR #165132)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Oct 26 20:30:22 PDT 2025
================
@@ -92,6 +93,17 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr day& day::operator-=(const days& __dd) no
} // namespace chrono
+# if _LIBCPP_STD_VER >= 26
+
+template <>
+struct hash<chrono::day> : public __unary_function<chrono::day, size_t> {
----------------
frederick-vs-ja wrote:
Let's not add `__unary_function` (ditto below). It's only necessary for `hash` specializations present before C++11 or C++20.
```suggestion
struct hash<chrono::day> {
```
https://github.com/llvm/llvm-project/pull/165132
More information about the libcxx-commits
mailing list