std::forwar...orward_list(3)
π std::forward_list::~forward_list π
okay so bestie, weβre deep in the C++ Standard Libary β yes, thatβs the manual name, spelling included π β and the page title is std::forward_list::~forward_list, aka the destructor. The header even truncates it as std::forwar...orward_list(3), which is giving βwe ran out of roomβ energy π.
π NAME π
std::forward_list::~forward_listβstd::forward_list::~forward_list
Like, thatβs the name, fr fr: std::forward_list::~forward_list is std::forward_list::~forward_list. No notes π
.
β¨ Synopsis β¨
~forward_list(); (since C++11)
So the destructor is ~forward_list();, and itβs been a thing since C++11 β.
It destructs the forward_list. The destructors of the elements are called, and the used storage is deallocated. Big important note though: if the elements are pointers, the pointed-to objects are not destroyed β the list handles its own elements and storage, but it does not chase pointers and clean up whatever they point at. periodt π«Ά.
π¦ Complexity π¦
Linear in the size of the forward_list β so yeah, itβs giving βwalks through the whole listβ realness β.
mwah π β source/version: http://cppreference.com, dated 2024.06.10, page std::forwar...orward_list(3).
π¦ 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