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 areferencepointing at the bit at__posinside__b. no throwing, she'snoexceptπ«Άreference & flip () noexceptβ flips that bit and hands the reference back.noexcept, periodt β¨operator bool () const noexceptβ converts the proxy to a plainbool, because sometimes you just want the truth.const,noexceptπreference & operator= (bool __x) noexceptβ assigns aboolinto the referenced bit.noexceptπreference & operator= (const reference &__j) noexceptβ assigns from anotherreference. alsonoexcept, also slaying πbool operator~ () const noexceptβ gives you the flipped value as abool.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
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms