[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


================
@@ -13,6 +13,7 @@
 #include <__compare/ordering.h>
 #include <__compare/three_way_comparable.h>
 #include <__config>
+#include <__functional/hash.h>
----------------
frederick-vs-ja wrote:

I thing we can either
- add `<__chrono/duration_hash.h>` and `<__chrono/time_point_hash.h>` (together with changes to `CMakeList.txt` and `module.modulemap.in`) and move `hash` specializations into them, which avoids changing transitive includes; or
- just modify `libcxx/test/libcxx/transitive_includes/cxx26.csv` to add entries `memory_resource cstring`, `mutex cstring`, and `shared_mutex cstring` to resolve test failures about transitive includes.

I'm not sure which one is better. The first one is more complicated but possibly better for compiler throughput.

https://github.com/llvm/llvm-project/pull/165132


More information about the libcxx-commits mailing list