[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


================
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
+
+// <memory>
+
+// shared_ptr
+
+// template<class U> bool owner_equal(shared_ptr<U> const& b) const noexcept;
+
+#include <memory>
+#include <cassert>
+#include "test_macros.h"
----------------
Zingam wrote:

```suggestion
#include <cassert>
#include <memory>

#include "test_macros.h"
```

`#include`'s should be sorted and grouped manually. Here and bellow.

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


More information about the libcxx-commits mailing list