Namespaces
Variants

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

From cppreference.net

~forward_list ( ) ;
(自 C++11 起)
(自 C++26 起为 constexpr)

析构 forward_list 。调用元素的析构函数并释放已使用的存储空间。

复杂度

线性于 * this 的大小。

注释

如果元素是指针,所指向的对象不会被销毁。