mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[libc++][spaceship] P1614R2: Removed ops from memory_resource, polymorphic_allocator
Implements parts of P1614R2 - Removed ops from `memory_resource` - Removed ops from `polymorphic_allocator` Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D152629
This commit is contained in:
@@ -55,9 +55,11 @@ Section,Description,Dependencies,Assignee,Complete
|
||||
| `[allocator.globals] <https://wg21.link/allocator.globals>`_,| remove ops `allocator <https://reviews.llvm.org/D152612>`_,None,Hristo Hristov,|In Progress|
|
||||
| `[unique.ptr.special] <https://wg21.link/unique.ptr.special>`_,| `unique_ptr <https://reviews.llvm.org/D130838>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
|
||||
| `[util.smartptr.shared.cmp] <https://wg21.link/util.smartptr.shared.cmp>`_,| `shared_ptr <https://reviews.llvm.org/D130852>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
|
||||
| `[mem.res.syn] <https://wg21.link/mem.res.syn>`_,|,None,Unassigned,|Not Started|
|
||||
| `[mem.res.eq] <https://wg21.link/mem.res.eq>`_,| remove ops `memory_resource`,None,Unassigned,|Not Started|
|
||||
| `[mem.poly.allocator.eq] <https://wg21.link/mem.poly.allocator.eq>`_,| remove ops `polymorphic_allocator`,None,Unassigned,|Not Started|
|
||||
"| `[mem.res.syn] <https://wg21.link/mem.res.syn>`_
|
||||
| `[mem.res.eq] <https://wg21.link/mem.res.eq>`_
|
||||
| `[mem.poly.allocator.eq] <https://wg21.link/mem.poly.allocator.eq>`_","|
|
||||
| remove ops `memory_resource <https://reviews.llvm.org/D152629>`_
|
||||
| remove ops `polymorphic_allocator <https://reviews.llvm.org/D152629>`_",None,Hristo Hristov,|Complete|
|
||||
"| `[allocator.adaptor.syn] <https://wg21.link/allocator.adaptor.syn>`_
|
||||
| `[scoped.adaptor.operators] <https://wg21.link/scoped.adaptor.operators>`_",| remove ops `scoped_allocator_adaptor`,None,Unassigned,|Not Started|
|
||||
"| `[functional.syn] <https://wg21.link/functional.syn>`_
|
||||
|
||||
|
@@ -55,10 +55,14 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator==(const memory_resource& __lhs, const
|
||||
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;
|
||||
|
||||
@@ -207,12 +207,16 @@ operator==(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<
|
||||
return *__lhs.resource() == *__rhs.resource();
|
||||
}
|
||||
|
||||
# if _LIBCPP_STD_VER <= 17
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
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
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace std::pmr {
|
||||
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 Tp> class polymorphic_allocator;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace std::pmr {
|
||||
const polymorphic_allocator<T2>& b) noexcept;
|
||||
template <class T1, class T2>
|
||||
bool operator!=(const polymorphic_allocator<T1>& a,
|
||||
const polymorphic_allocator<T2>& b) noexcept;
|
||||
const polymorphic_allocator<T2>& b) noexcept; // removed in C++20
|
||||
|
||||
// Global memory resources
|
||||
memory_resource* set_default_resource(memory_resource* r) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user