[libcxx-commits] [libcxx] [libc++] Remove _LIBCPP_HAS_SIZED_DEALLOCATION (PR #172285)
Nico Weber via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 8 11:26:13 PST 2026
================
@@ -13,7 +13,6 @@
#include <__cstddef/max_align_t.h>
#include <__cstddef/size_t.h>
#include <__new/align_val_t.h>
-#include <__new/global_new_delete.h> // for _LIBCPP_HAS_SIZED_DEALLOCATION
----------------
nico wrote:
Is removing this line right? We're now seeing build failures on our linux bots (others are fine):
```
In module 'std' imported from ../../third_party/angle/third_party/glmark2/src/src/libmatrix/log.h:16:
gen/third_party/libc++/src/include/__new/allocate.h:59:12: error: no matching function for call to 'operator delete'
59 | return __builtin_operator_delete(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size), static_cast<align_val_t>(__align));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gen/third_party/libc++/src/include/__memory/allocator.h:107:12: note: in instantiation of function template specialization 'std::__libcpp_deallocate<std::string>' requested here
107 | std::__libcpp_deallocate<_Tp>(__p, __element_count(__n));
| ^
note: candidate function not viable: no known conversion from 'align_val_t' to 'std::align_val_t' for 3rd argument
note: candidate function not viable: requires 2 arguments, but 3 were provided
note: candidate function not viable: requires 2 arguments, but 3 were provided
gen/third_party/libc++/src/include/__new/placement_new_delete.h:30:35: note: candidate function not viable: requires 2 arguments, but 3 were provided
30 | inline _LIBCPP_HIDE_FROM_ABI void operator delete(void*, void*) _NOEXCEPT {}
| ^ ~~~~~~~~~~~~
note: candidate function not viable: requires 1 argument, but 3 were provided
```
The three-arg operator delete declaration is in `__new/global_new_delete.h`, right? How is this supposed to work without this include?
https://github.com/llvm/llvm-project/pull/172285
More information about the libcxx-commits
mailing list