[libcxx-commits] [libcxx] [libc++] Use new/delete expressions for memory allocation in <any> (PR #219153)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 27 05:48:26 PDT 2026
================
@@ -437,20 +435,15 @@ struct _LargeHandler {
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI static _Tp& __create(any& __dest, _Args&&... __args) {
- _Tp* __ptr = static_cast<_Tp*>(std::__libcpp_allocate<_Tp>(__element_count(1)));
- std::__exception_guard __guard([&] { std::__libcpp_deallocate<_Tp>(__ptr, __element_count(1)); });
----------------
ldionne wrote:
Right, of course.
https://github.com/llvm/llvm-project/pull/219153
More information about the libcxx-commits
mailing list