Namespaces
Variants

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

来自 zh.cppreference.net

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

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

复杂度

线性于 * this 的大小。