[libcxx-commits] [libcxx] [z/OS][libc++] Guard to be used only when `align_val_t` is available (PR #114396)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 31 08:32:44 PDT 2024
================
@@ -72,11 +73,14 @@ class __small_buffer {
}
}
+# endif // _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION
+# ifdef _LIBCPP_HAS_LIBRARY_SIZED_DEALLOCATION
template <class _Stored>
_LIBCPP_HIDE_FROM_ABI void __dealloc() noexcept {
if constexpr (!__fits_in_buffer<_Stored>)
::operator delete[](*reinterpret_cast<void**>(__buffer_), sizeof(_Stored), align_val_t{alignof(_Stored)});
----------------
ldionne wrote:
Same here, I think we want to use `__libcpp_deallocate` instead, which handles the absence of sized deallocation.
https://github.com/llvm/llvm-project/pull/114396
More information about the libcxx-commits
mailing list