Namespaces
Variants

std::set<Key,Compare,Allocator>:: ~set

From cppreference.net

~set ( ) ;
(自 C++26 起为 constexpr)

析构 set 对象。调用元素的析构函数并释放使用的存储空间。

复杂度

线性于 * this 的大小。

注释

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