Skip to content

Commit 933a2b1

Browse files
committed
[libc++] Simplify when the sized global deallocations overloads are available
1 parent a204252 commit 933a2b1

File tree

1 file changed

+4
-16
lines changed
  • libcxx/include

1 file changed

+4
-16
lines changed

libcxx/include/new

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,6 @@ void operator delete[](void* ptr, void*) noexcept;
104104
#endif
105105

106106
#if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L
107-
# define _LIBCPP_HAS_LANGUAGE_SIZED_DEALLOCATION 1
108-
#else
109-
# define _LIBCPP_HAS_LANGUAGE_SIZED_DEALLOCATION 0
110-
#endif
111-
112-
#if _LIBCPP_STD_VER >= 14 || _LIBCPP_HAS_LANGUAGE_SIZED_DEALLOCATION
113-
# define _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION 1
114-
#else
115-
# define _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION 0
116-
#endif
117-
118-
#if _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION && _LIBCPP_HAS_LANGUAGE_SIZED_DEALLOCATION
119107
# define _LIBCPP_HAS_SIZED_DEALLOCATION 1
120108
#else
121109
# define _LIBCPP_HAS_SIZED_DEALLOCATION 0
@@ -214,7 +202,7 @@ inline constexpr destroying_delete_t destroying_delete{};
214202
_LIBCPP_NOALIAS;
215203
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
216204
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
217-
# if _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION
205+
# if _LIBCPP_HAS_SIZED_DEALLOCATION
218206
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
219207
# endif
220208

@@ -223,7 +211,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _
223211
_LIBCPP_NOALIAS;
224212
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT;
225213
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
226-
# if _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION
214+
# if _LIBCPP_HAS_SIZED_DEALLOCATION
227215
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
228216
# endif
229217

@@ -233,7 +221,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz)
233221
operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
234222
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT;
235223
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
236-
# if _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION
224+
# if _LIBCPP_HAS_SIZED_DEALLOCATION
237225
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
238226
# endif
239227

@@ -243,7 +231,7 @@ operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
243231
operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
244232
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
245233
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
246-
# if _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION
234+
# if _LIBCPP_HAS_SIZED_DEALLOCATION
247235
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
248236
# endif
249237
# endif

0 commit comments

Comments
 (0)