__GNU_PBDS::DETAIL::RC(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 6 versions
, in arch rolling, fedora 44

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 an entry bestie πŸ¦‹

πŸ’– 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 an entry on there, again, no return value, she's not about that πŸ“
  • size_type size () const β€” how many things are in there, as a size_type, very demure 🧚
  • void swap (rc &) β€” trades contents with another rc, mutually beneficial, slay 🀝
  • node_pointer top () const β€” peeks at the top and gives you a node_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