Namespaces
Variants

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

From cppreference.net

~set ( ) ;
(constexpr C++26以降)

set を破棄します。要素のデストラクタが呼び出され、使用されていた記憶域が解放されます。

計算量

* this のサイズに対して線形。

注記

要素がポインタの場合、指し示すオブジェクトは破棄されません。