STD::_BASE_BITSET(3)

🌸 std::_Base_bitset< _Nw > 🌸

okay bestie, sit down, hydrate, and let me tell you about the secret little engine room of bitset πŸ’… this page lives in the Library Functions Manual and it's part of libstdc++, so you know it's the real deal.


✨ NAME ✨

std::_Base_bitset< _Nw > β€” the base class, the blueprint, the foundation, the queen bee behind the scenes 🐝


πŸ“œ SYNOPSIS πŸ“œ

First things first, you gotta let it in the door:

#include <bitset>

πŸŽ€ Public Types πŸŽ€

Just one, and she's iconic:

  • typedef unsigned long _WordT β€” this is the word type, the chunk size everything gets stored in πŸ’–

πŸ’… Public Member Functions πŸ’…

okay here's the whole roster, no skips, no skips, we list every single one:

constexpr _Base_bitset (unsigned long long __val) noexcept
template<size_t _Nb> constexpr bool _M_are_all () const noexcept
constexpr void _M_do_and (const _Base_bitset< _Nw > &__x) noexcept
constexpr size_t _M_do_count () const noexcept
constexpr size_t _M_do_find_first (size_t) const noexcept
constexpr size_t _M_do_find_next (size_t, size_t) const noexcept
constexpr void _M_do_flip () noexcept
constexpr void _M_do_left_shift (size_t __shift) noexcept
constexpr void _M_do_or (const _Base_bitset< _Nw > &__x) noexcept
constexpr void _M_do_reset () noexcept
constexpr void _M_do_right_shift (size_t __shift) noexcept
constexpr void _M_do_set () noexcept
constexpr unsigned long long _M_do_to_ullong () const
constexpr unsigned long _M_do_to_ulong () const
constexpr void _M_do_xor (const _Base_bitset< _Nw > &__x) noexcept
constexpr const _WordT * _M_getdata () const noexcept
constexpr _WordT _M_getword (size_t __pos) const noexcept
constexpr _WordT & _M_getword (size_t __pos) noexcept
constexpr _WordT _M_hiword () const noexcept
constexpr _WordT & _M_hiword () noexcept
constexpr bool _M_is_any () const noexcept
constexpr bool _M_is_equal (const _Base_bitset< _Nw > &__x) const
    noexcept

like... the way there's an overload of _M_getword and an overload of _M_hiword, one const and one not, so you can read and write? that's range, that's versatility, that's main character energy πŸ‘‘

⭐ Static Public Member Functions ⭐

these ones you don't even need an instance for, they just exist, effortlessly:

static constexpr _WordT _S_maskbit (size_t __pos) noexcept
static constexpr size_t _S_whichbit (size_t __pos) noexcept
static constexpr size_t _S_whichbyte (size_t __pos) noexcept
static constexpr size_t _S_whichword (size_t __pos) noexcept

_S_whichbit, _S_whichbyte, _S_whichword β€” the it-girl trio of "which container does this bit live in" πŸ¦‹ and _S_maskbit makes the mask. slay.

🫢 Public Attributes 🫢

  • _WordT _M_w [_Nw] β€” and bestie, listen: 0 is the least significant word. no cap, that's literally the deal. πŸ™ˆ

πŸ’œ Detailed Description πŸ’œ

template<size_t _Nw>
struct std::_Base_bitset< _Nw >

"Base class, general case. It is a class invariant that _Nw will be nonnegative.

See documentation for bitset.

so fr fr, _Nw being nonnegative isn't a suggestion, it's a class invariant β€” the whole thing just assumes it and you should too. and if you want the full tea, go read the bitset docs, this page is just the scaffolding. 🌈


🧚 Member Data Documentation 🧚

template<size_t _Nw> _WordT std::_Base_bitset< _Nw >::_M_w[_Nw]

0 is the least significant word. ✨ (yes we said it twice, it's important enough to say twice, that's just how it is)


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. not a human author, just a robot doing its little job πŸŽ€


and that's the whole page, bestie β€” nothing skipped, nothing fudged, every signature preserved character for character πŸ’–

mwah πŸ’‹ this was libstdc++'s std::_Base_bitset< _Nw >(3) page, signing off, go forth and bitset responsibly πŸ¦‹βœ¨

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