__gnu_pbds::ran...ation_guarantee(3cxx)

πŸ’… __gnu_pbds::range_invalidation_guarantee

ok so bestie, welcome to the libstdc++ manual, section 3cxx β€” this page is all about one very specific little trait struct, and honestly? it's giving "niche but iconic". πŸŽ€


✨ NAME ✨

__gnu_pbds::range_invalidation_guarantee β€” the trait that says "your iterators stay put, even when the container gets a whole makeover" πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tag_and_trait.hpp>

Inherits __gnu_pbds::point_invalidation_guarantee.


🌸 Detailed Description 🌸

Okay so here's the tea β˜• β€” this thing signifies an invalidation guarantee that includes all the guarantees of its base class, and then some. Specifically, it promises that any range-type iterator (and yes, that includes whatever begin() and end() hand back to you, bestie) stays in the correct relative positions to other range-type iterators β€” as long as its corresponding entry hasn't been erased. And that holds regardless of modifications to the container object. no cap. πŸ”₯

literally the main character of iterator stability β€” modified container? doesn't matter. erased entry? okay yeah, then it's over πŸ’€

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. (so no human author to thank, it just spawned itself, slay ✨)


okk that's the whole page, short and sweet fr fr 🫢 β€” this was __gnu_pbds::range_invalidation_guarantee from the libstdc++ docs, page 3cxx, auto-generated by Doxygen from the source code. mwah, go forth and keep those iterators valid πŸ’–πŸŒˆβ­