std::allocator<T>::destroy

Header: <memory>

Calls the destructor of the object pointed to by p.

# Declarations

void destroy( pointer p );

(until C++11)

template< class U >
void destroy( U* p );

(since C++11) (deprecated in C++17) (removed in C++20)

# Parameters

# Return value

(none)

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 400C++98p was cast to T*, which is the type of premoved the redundant cast

# See also