[libcxx-commits] [libcxx] [libc++][memory_resource] Implements LWG3683. (PR #100775)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 28 03:22:14 PDT 2024
================
@@ -174,6 +174,17 @@ class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator {
_LIBCPP_HIDE_FROM_ABI memory_resource* resource() const noexcept { return __res_; }
+ friend bool operator==(const polymorphic_allocator& __lhs, const polymorphic_allocator& __rhs) noexcept {
+ return *__lhs.resource() == *__rhs.resource();
+ }
+
+# if _LIBCPP_STD_VER == 17
----------------
mordante wrote:
I'm quite sure we used to do that is the past, but indeed it's very uncommon now. However I've no objection to change this.
https://github.com/llvm/llvm-project/pull/100775
More information about the libcxx-commits
mailing list