STD::TR2::DYNAMIC_BITSET_REFERENCE(3)

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

πŸ’– NAME πŸ’–

std::tr2::dynamic_bitset< _WordT, _Alloc >::reference β€” bestie, we're in the Library Functions Manual, section 3, and this is the lil' diva that pretends to be one single bit ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <dynamic_bitset>

🌸 Public Member Functions 🌸

  • reference (dynamic_bitset &__b, size_type __pos) noexcept β€” build a brand new proxy pointing at bit __pos of bitset __b, no exceptions thrown, we stay calm πŸ’…
  • reference & flip () noexcept β€” flip that bit and hand the reference right back to you, noexcept the whole way πŸ”₯
  • operator bool () const noexcept β€” the glow-up into a real bool, automatic, no drama, noexcept
  • reference & operator= (bool __x) noexcept β€” assign a bool in, get the reference back out, noexcept
  • reference & operator= (const reference &__j) noexcept β€” copy-assign from another reference, again returning *this, again noexcept
  • bool operator~ () const noexcept β€” the flipped value of the bit as a plain bool, const, noexcept

πŸ¦‹ Friends πŸ¦‹

  • class dynamic_bitset β€” yeah it's friends with the whole class, they're close like that 🫢

✨ DETAILED DESCRIPTION ✨

template<typename _WordT = unsigned long long, typename _Alloc = std::allocator<_WordT>>
class std::tr2::dynamic_bitset< _WordT, _Alloc >::reference

okay so this class is literally a whole entire concept of a single bit. One bit!! An instance of it is a proxy for an actual bit β€” a stand-in, a body double, main character energy for a 0 or a 1 πŸ‘‘

and why would you even do that? because this way the individual bit operations get done as faster word-size bitwise instructions ⚑ it's giving efficiency, it's giving clever, we love her.

most users will never need to touch this class directly. no cap. the conversions to and from bool are automatic and should be totally transparent β€” you won't even notice she's there. the overloaded operators are doing the work to keep the illusion alive, like a tiny bit of stage magic 🧚

(On a typical system, this "bit %reference" is 64 times the size of an actual bit. Ha.) πŸ’€

like... 64x. for one bit. not me crying over the overhead πŸ™ˆ iconic behaviour honestly.


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. she didn't write herself, bestie, the robots did it for her πŸ€–πŸ’–


and that's the whole page, periodt. this little writeup came to you from the libstdc++ docs, page std::tr2::...::reference(3) β€” go forth and proxy your bits responsibly, iykyk πŸŒˆβ­πŸ“

πŸ“¦ 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