[libcxx-commits] [libcxx] [libc++] Implement P1901R2: owner_hash and owner_equal for shared_ptr/weak_ptr (PR #210551)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 22 22:47:48 PDT 2026
================
@@ -817,6 +823,32 @@ struct owner_less<void>
typedef void is_transparent;
};
+// class owner_hash: // C++26
+struct owner_hash
+{
+ template <class _Tp>
+ size_t operator()(shared_ptr<_Tp> const& __p) const noexcept;
+ template <class _Tp>
+ size_t operator()(weak_ptr<_Tp> const& __p) const noexcept;
+
+ typedef void is_transparent;
----------------
Zingam wrote:
The synopsis should be copied from the standard preferably.
https://github.com/llvm/llvm-project/pull/210551
More information about the libcxx-commits
mailing list