STD::TR2::DYNAMIC_BITSET_REFERENCE(3cxx)

πŸŽ€ std::tr2::dynamic_bitset< _WordT, _Alloc >::reference πŸŽ€

okay bestie, this page is from the 3cxx manual, and it's all about std::tr2::dynamic_bitset< _WordT, _Alloc >::reference β€” the lil proxy guy that stands in for one single bit. iconic behavior, honestly πŸ’…


✨ NAME ✨

std::tr2::dynamic_bitset< _WordT, _Alloc >::reference β€” the reference class for one bit inside a dynamic_bitset. no cap, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

#include <dynamic_bitset>

πŸ’– Public Member Functions πŸ’–

  • reference (dynamic_bitset &__b, size_type __pos) noexcept β€” builds a reference pointing at the bit at __pos inside __b. no throwing, she's noexcept 🫢
  • reference & flip () noexcept β€” flips that bit and hands the reference back. noexcept, periodt ✨
  • operator bool () const noexcept β€” converts the proxy to a plain bool, because sometimes you just want the truth. const, noexcept πŸ’€
  • reference & operator= (bool __x) noexcept β€” assigns a bool into the referenced bit. noexcept πŸŽ€
  • reference & operator= (const reference &__j) noexcept β€” assigns from another reference. also noexcept, also slaying πŸ’…
  • bool operator~ () const noexcept β€” gives you the flipped value as a bool. const, noexcept, adorable 🌈

🧚 Friends 🧚

  • class dynamic_bitset β€” bestie has special access. iykyk πŸ‘‘

πŸ‘‘ Detailed Description πŸ‘‘

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

so this class literally encapsulates the concept of a single bit. an instance of this class is a proxy for an actual bit β€” and the whole reason is so the individual bit operations can be done as faster word-size bitwise instructions. highkey clever πŸ”₯

most users will never need to use this class directly; conversions to and from bool are automatic and should be transparent. overloaded operators help to preserve the illusion. main character energy from the operators, honestly ✨

(On a typical system, this 'bit %reference' is 64 times the size of an actual bit. Ha.) 😭

like… 64 times the size. not me crying over a proxy object πŸ’€


🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code.


and that's the whole page, bestie 🫢 the footer on this one reads libstdstd::tr2::dyna...oc >::reference(3cxx), and yeah, it was generated automatically by Doxygen for libstdc++ from the source code. no date on the page, so we're not gonna invent one β€” we stay factual in this group chat πŸ’œβœ¨

πŸ“¦ where this page comes from