std::polymorphic<T, Allocator>::~polymorphic
来自cppreference.com
< cpp | memory | polymorphic
内存管理库
|
constexpr ~polymorphic(); | (C++26 起) | |
如果 *this 拥有对象,那么通过 std::allocator_traits<Allocator>::destroy 销毁拥有的对象,然后解分配存储。
否则什么也不做。
如果 T
是不完整类型,那么程序非良构。