[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:47 PDT 2026
================
@@ -633,6 +633,9 @@ public:
explicit operator bool() const noexcept;
template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
template<class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
+ size_t owner_hash() const noexcept; // C++26
+ template<class U> bool owner_equal(shared_ptr<U> const& b) const noexcept; // C++26
+ template<class U> bool owner_equal(weak_ptr<U> const& b) const noexcept; // C++26
----------------
Zingam wrote:
```suggestion
size_t owner_hash() const noexcept; // C++26
template<class U> bool owner_equal(shared_ptr<U> const& b) const noexcept; // C++26
template<class U> bool owner_equal(weak_ptr<U> const& b) const noexcept; // C++26
```
Nit: please ident. Also bellow.
https://github.com/llvm/llvm-project/pull/210551
More information about the libcxx-commits
mailing list