[libcxx-commits] [libcxx] [libc++] Make sure LWG2070 is implemented as a DR (PR #65998)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 12 12:55:37 PDT 2023
================
@@ -321,7 +323,9 @@ struct __shared_ptr_emplace
allocator_traits<_TpAlloc>::destroy(__tmp, __get_elem());
}
#else
- __get_elem()->~_Tp();
+ using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
----------------
EricWF wrote:
Can't we just use the other branch of code here? Why keep the `#ifdef` around.
Especially because this code is in a vtable, and so it's an ABI issue. We can't have `#ifdef`s in code like this Especially ifdefs that change on language dialect.
https://github.com/llvm/llvm-project/pull/65998
More information about the libcxx-commits
mailing list