std::unorde...ordered_set(3)
β¨ NAME β¨
std::unordered_set::~unordered_set β bestie, it's literally the destructor for std::unordered_set π
This page lives in the C++ Standard Library section of the manual, and it's giving "cleanup era" energy. π§Ήβ¨
πΈ SYNOPSIS πΈ
~unordered_set(); (since C++11)
Okay so this is the destructor, and it's been iconic since C++11. π«Ά
π DESCRIPTION π
So what does ~unordered_set() actually do? It destructs the unordered_set. Periodt. π
The destructors of the elements are called, and the used storage is deallocated. Very demure, very mindful cleanup. πΈ
β οΈ But bestie, listen: if the elements are pointers, the pointed-to objects are not destroyed. The set only handles its own storage β it does not chase down whatever your pointers are pointing at. No cap. π
π COMPLEXITY π
Linear in the size of the unordered_set. So the more elements you've got, the more time it takes β it's giving proportional effort, not constant-time magic. π
That's the whole page, bestie β short, sweet, and fully destructed. π
This masterpiece of documentation was brought to you by cppreference.com, dated 2024.06.10. Go off, king. πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms