[libcxx-commits] [libcxx] [libc++][chrono] P2592R3: Hashing for chrono (PR #165132)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 27 02:04:31 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> {
+ _LIBCPP_HIDE_FROM_ABI static size_t operator()(const chrono::day& __d) noexcept {
----------------
frederick-vs-ja wrote:
Test failures indicated that we should include `<__cstddef/size_t.h>` in every header where `hash` specialization is being added.
https://github.com/llvm/llvm-project/pull/165132
More information about the libcxx-commits
mailing list