[libcxx-commits] [libcxx] [libc++][NFC] Use __construct_at and __destroy_at insted of using preprocessor conditionals (PR #70866)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 20 17:22:04 PST 2023
================
@@ -319,11 +315,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
__enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void destroy(allocator_type&, _Tp* __p) {
-#if _LIBCPP_STD_VER >= 20
----------------
EricWF wrote:
Why is using `destroy_at` better than simply invoking the destructor? One costs a lot less to instantiate.
It's not a customization point, right?
https://github.com/llvm/llvm-project/pull/70866
More information about the libcxx-commits
mailing list