STD::BITSET_REFERENCE(3)
π NAME π
std::bitset< _Nb >::reference β bestie, it's the tiny proxy class that lets you vibe with one single bit of a bitset like it's a real object. π
β¨ SYNOPSIS β¨
#include <bitset>
π«Ά Public Member Functions
reference (const reference &)=defaultβ the copy constructor, just defaulted, doing absolutely nothing extra, living its simple life. πconstexpr reference & flip () noexceptβ flips this bit, returns a reference to itself, and promises it will never throw (noexcept). iconic.constexpr operator bool () const noexceptβ converts the reference into an actualboolwhenever you need one, silently and automatically,noexcept. no drama. πΈconstexpr reference & operator= (bool __x) noexceptβ assigns abool(__x) into this bit, hands you back the reference,noexcept. β¨constexpr reference & operator= (const reference &__j) noexceptβ assigns from anotherreference(__j), returns the reference,noexcept. πconstexpr bool operator~ () const noexceptβ the tilde! gives you the negated bit as abool,noexcept. π
π¦ Friends
class bitsetβ yes,bitsetitself is a friend, it gets the VIP access, iykyk. π₯
π DETAILED DESCRIPTION π
template<size_t _Nb>
class std::bitset< _Nb >::reference
Okay so picture this: this class encapsulates the concept of a single bit. π§ One instance of it is a proxy for an actual bit β and the reason it exists is lowkey genius: this way the individual bit operations get done as faster word-size bitwise instructions. speed. efficiency. main character energy.
Most users will never need to use this class directly, fr fr. The conversions to and from bool are automatic and should be totally transparent, and the overloaded operators are out here helping to preserve the illusion. πͺβ¨
And now the part that sends me: on a typical system, this bit reference is 64 times the size of an actual bit. Ha. π
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code. no human author, just robots doing their thing. π€π
and that's the whole page bestie, brought to you by libstdc++ and its std::bitse...::reference(3) manual page β Library Functions Manual energy, no date given, just vibes. π
πΈ
π¦ 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