__GNU_PBDS::DETAIL::RC(3)
NAME π
__gnu_pbds::detail::rc< _Node, _Alloc > β a Redundant binary counter. yes bestie that's literally the whole name, we're in the __gnu_pbds::detail basement, this is a Library Functions Manual situation π«Ά
β¨ SYNOPSIS β¨
okay so first things first, you gotta let the compiler know you want in:
#include <rc.hpp>
π Public Types
the little type aliases, she has exactly two, and they're iconic:
typedef entry_const_pointer const_iteratorβ the const iterator vibe. it's giving "look but don't touch" πtypedef node_pointer entryβ a node pointer but make it fashion. that's anentrybestie π¦
π Public Member Functions
here's the whole roster, no skips, no cuts, all ten of them:
rc (const rc &)β copy constructor, she's a dupe girlie (affectionate) πconst const_iterator begin () constβ hands you the start of the party, const-style πΈvoid clear ()β wipes everything, no survivors, bye πbool empty () constβ vibe check: is she empty? returns a bool, no cap β¨const const_iterator end () constβ the end of the party, also const, also chill πvoid pop ()β yeets the top off, returns nothing, that's just how she is πvoid push (entry)β shoves anentryon there, again, no return value, she's not about that πsize_type size () constβ how many things are in there, as asize_type, very demure π§void swap (rc &)β trades contents with anotherrc, mutually beneficial, slay π€node_pointer top () constβ peeks at the top and gives you anode_pointer, obsessed π
π Detailed Description π
the actual declaration, copied exactly because we do NOT play with signatures around here:
template<typename _Node, typename _Alloc>
class __gnu_pbds::detail::rc< _Node, _Alloc >
and the one-liner description, quoted for accuracy:
"Redundant binary counter.
periodt. that's the whole description. she's mysterious, she's a redundant binary counter, she's in the detail namespace for a reason iykyk π
π Author
Generated automatically by Doxygen for libstdc++ from the source code.
fr fr, nobody hand-wrote this one, Doxygen did all the heavy lifting and honestly? she ate. π
and that's the whole page bestie π this came out of libstdc++ β the footer said so, with its libstdc++ source and the version-and-date line β so go forth, push, pop, top, and swap responsibly. mwah πβ¨
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms