[libcxx-commits] [libcxx] [libc++] Avoid type-punning between __hash_value_type and pair (PR #143501)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 12 03:20:46 PDT 2025


================
@@ -1053,8 +965,8 @@ public:
 
 private:
   typedef __hash_value_type<key_type, mapped_type> __value_type;
-  typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher;
-  typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher> __key_equal;
+  typedef __unordered_map_hasher<key_type, value_type, hasher, key_equal> __hasher;
+  typedef __unordered_map_equal<key_type, value_type, key_equal, hasher> __key_equal;
   typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
----------------
philnik777 wrote:

See #148353

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


More information about the libcxx-commits mailing list