std::destroy_at
From cppreference.com
Defined in header <memory>
|
||
template< class T > void destroy_at( T* p ); |
(since C++17) | |
Calls the destructor of the object pointed to by p
, as if by p->~T()
.
Contents |
Parameters
p | - | a pointer to the object to be destroyed |
Return value
(none)
Possible implementation
template<class T> void destroy_at(T* p) { p->~T(); } |
Example
This section is incomplete Reason: no example |
See also
(C++17) |
destroys a range of objects (function template) |
(C++17) |
destroys a number of objects in a range (function template) |