Namespaces
Variants

std::stack<T,Container>::~stack

来自 zh.cppreference.net

~stack();
(从 C++26 起 constexpr)

销毁栈。元素的析构函数被调用(顺序未指定),动态分配的存储(如果有)被释放。注意,如果元素是指针,则不会销毁所指向的对象。

复杂度

线性于 * this 的大小。