diff --git a/libcxx/docs/Status/SpaceshipProjects.csv b/libcxx/docs/Status/SpaceshipProjects.csv --- a/libcxx/docs/Status/SpaceshipProjects.csv +++ b/libcxx/docs/Status/SpaceshipProjects.csv @@ -55,9 +55,11 @@ | `[allocator.globals] `_,| remove ops `allocator `_,None,Hristo Hristov,|In Progress| | `[unique.ptr.special] `_,| `unique_ptr `_,[comparisons.three.way],Adrian Vogelsgesang,|Complete| | `[util.smartptr.shared.cmp] `_,| `shared_ptr `_,[comparisons.three.way],Adrian Vogelsgesang,|Complete| -| `[mem.res.syn] `_,|,None,Unassigned,|Not Started| -| `[mem.res.eq] `_,| remove ops `memory_resource`,None,Unassigned,|Not Started| -| `[mem.poly.allocator.eq] `_,| remove ops `polymorphic_allocator`,None,Unassigned,|Not Started| +"| `[mem.res.syn] `_ +| `[mem.res.eq] `_ +| `[mem.poly.allocator.eq] `_","| +| remove ops `memory_resource `_ +| remove ops `polymorphic_allocator `_",None,Hristo Hristov,|Complete| "| `[allocator.adaptor.syn] `_ | `[scoped.adaptor.operators] `_",| remove ops `scoped_allocator_adaptor`,None,Unassigned,|Not Started| "| `[functional.syn] `_ diff --git a/libcxx/include/__memory_resource/memory_resource.h b/libcxx/include/__memory_resource/memory_resource.h --- a/libcxx/include/__memory_resource/memory_resource.h +++ b/libcxx/include/__memory_resource/memory_resource.h @@ -55,10 +55,14 @@ return &__lhs == &__rhs || __lhs.is_equal(__rhs); } +# if _LIBCPP_STD_VER <= 17 + inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const memory_resource& __lhs, const memory_resource& __rhs) noexcept { return !(__lhs == __rhs); } +# endif + // [mem.res.global] [[__gnu__::__returns_nonnull__]] _LIBCPP_FUNC_VIS memory_resource* get_default_resource() noexcept; diff --git a/libcxx/include/__memory_resource/polymorphic_allocator.h b/libcxx/include/__memory_resource/polymorphic_allocator.h --- a/libcxx/include/__memory_resource/polymorphic_allocator.h +++ b/libcxx/include/__memory_resource/polymorphic_allocator.h @@ -207,12 +207,16 @@ return *__lhs.resource() == *__rhs.resource(); } +# if _LIBCPP_STD_VER <= 17 + template inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<_Up>& __rhs) noexcept { return !(__lhs == __rhs); } +# endif + } // namespace pmr _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/memory_resource b/libcxx/include/memory_resource --- a/libcxx/include/memory_resource +++ b/libcxx/include/memory_resource @@ -22,7 +22,7 @@ bool operator==(const memory_resource& a, const memory_resource& b) noexcept; bool operator!=(const memory_resource& a, - const memory_resource& b) noexcept; + const memory_resource& b) noexcept; // removed in C++20 template class polymorphic_allocator; @@ -31,7 +31,7 @@ const polymorphic_allocator& b) noexcept; template bool operator!=(const polymorphic_allocator& a, - const polymorphic_allocator& b) noexcept; + const polymorphic_allocator& b) noexcept; // removed in C++20 // Global memory resources memory_resource* set_default_resource(memory_resource* r) noexcept;