[libcxx-commits] [libcxx] [libc++] Implement P1901R2: owner_hash and owner_equal for shared_ptr/weak_ptr (PR #210551)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 26 00:27:20 PDT 2026


================
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+
+// <memory>
+
+// struct owner_hash
+// {
+//     template<class T>
+//         size_t operator()(shared_ptr<T> const&) const noexcept;
+//     template<class T>
+//         size_t operator()(weak_ptr<T> const&) const noexcept;
+//
+//     typedef unspecified is_transparent;
----------------
frederick-vs-ja wrote:

Let's avoid divergence in synopsis comments.
```suggestion
//     using is_transparent = unspecified;
```

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


More information about the libcxx-commits mailing list