bsl::allocator_traits<std::allocator<ALLOCATOR_TYPE>>::destroy

Destroy an object of type _Tp

Synopsis

Declared in <bslma_allocatortraits.h>

template<typename _Tp>
constexpr
static
void
destroy(
    _Alloc& __a,
    _Tp* __p) noexcept(_S_nothrow_destroy<_Tp>());

Description

Calls __a.destroy(__p) if that expression is well-formed, otherwise calls __p->~_Tp()

Parameters

NameDescription
__aAn allocator.
__pPointer to the object to destroy