Namespaces
Variants
Actions

std::polymorphic<T, Allocator>::~polymorphic

From cppreference.com
< cpp‎ | memory‎ | polymorphic
 
C++
 
Memory management library
(exposition only*)
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
(until C++20*)
(until C++20*)

Garbage collector support (until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
 
std::polymorphic
constexpr ~polymorphic();
(since C++26)

If *this is not valueless, destroys the owned object using std::allocator_traits<Allocator>::destroy and then the storage is deallocated.

Otherwise, does nothing.

If T is an incomplete type, the program is ill-formed.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant