std::experi...::~optional(3)
π std::experimental::optional::~optional π
bestie, this page is from the C++ Standard Libary manual β yes, that spelling is in the original, leave her alone π β and it's the destructor page for std::experimental::optional. it's giving cleanup era, closure, and dramatic exits. π
πΈ NAME πΈ
std::experimental::optional::~optional -
std::experimental::optional::~optional
β¨ Synopsis β¨
~optional(); (library fundamentals TS)
okay so here's the vibe: if the object contains a value and the type T is not trivially destructible (peep std::is_trivially_destructible), it destroys the contained value by calling its destructor, as if by val->T::~T(). otherwise? it does nothing. literally nothing. a little nap. π΄
π Notes π
if T is trivially-destructible, then this destructor is also trivial, so optional<T> is also trivially-destructible. slay for compile-time efficiency, bestie. β¨
π¦ Category π¦
- Noindexed pages
source + version/date folded into this cute sign-off: http://cppreference.com, 2024.06.10 β periodt, that's the footer info. bye bestie, go destroy some contained values (only when appropriate) πππ¦
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms