std::chrono...:erase_after(3)
π NAME π
std::chrono::tzdb_list::erase_after β yes bestie, it's literally the same name twice, that's just how cppreference rolls, don't @ me π (this one lives in the C++ Standard Library, mwah)
β¨ Synopsis β¨
const_iterator erase_after( const_iterator p ); (since C++20)
okay so what this icon does: it erases the std::chrono::tzdb that's referred to by the iterator following p. like, p itself is safe, it's the next one that gets yeeted π«Ά
β οΈ heads up bestie β the behavior is undefined if that iterator is not dereferenceable. not "kinda weird", not "probably fine", undefined. do a vibe check on your iterator before you send it, fr fr π
and the good news? no pointers, references, or iterators are invalidated except for the ones referring to the erased element. everything else stays valid, slay β¨
πΈ Return value πΈ
An iterator pointing to the element following the erased element π β¦or end() if no such element exists. either way you get a thing back, no cap π
π¦ Notes π¦
tzdb_listis intended to be implementable as a singly linked list, and its interface resembles that ofstd::forward_list. the family resemblance is real π- but here's the catch: it has no
before_begin(). π - and because of that, it is not possible to erase the first element. the first one is main character energy and simply cannot be removed, periodt π
that's the whole page, you ate that πβ¨ source/version cppreference.com, dated 2024.06.10 β go forth and erase responsibly, bestie π§π
π¦ 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