---
name: "std::__debug::bitset"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::__debug::bitset/3cxx"
---

# std::\_\_debug::bitset(3cxx)

Class std::bitset with additional safety/checking/debug instrumentation.

## NAME

std::\_\_debug::bitset\< \_Nb \> - Class std::bitset with additional safety/checking/debug instrumentation.

## SYNOPSIS

`#include <bitset>`

Inherits bitset\< \_Nb \>.

### Public Types

**typedef** \_Base::reference **reference**\

### Public Member Functions

**bitset** (const **\_Base** &\_\_x)\
 template\<**typename** \_CharT \> **bitset** (const \_CharT \***\_\_str**, **typename** **std::basic\_string**\< \_CharT \>::size\_type \_\_n=**std::basic\_string**\< \_CharT \>::npos, \_CharT **\_\_zero**=\_CharT('0'), \_CharT **\_\_one**=\_CharT('1'))\
 template\<**class** \_CharT , **class** \_Traits , **class** \_Alloc \> **bitset** (const **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \> &**\_\_str**, **typename** **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \>::size\_type **\_\_pos**, **typename** **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \>::size\_type \_\_n, \_CharT **\_\_zero**, \_CharT **\_\_one**=\_CharT('1'))\
 template\<**typename** \_CharT , **typename** \_Traits , **typename** \_Alloc \> **bitset** (const **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \> &**\_\_str**, **typename** **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \>::size\_type **\_\_pos**=0, **typename** **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \>::size\_type \_\_n=(**std::basic\_string**\< \_CharT, \_Traits, \_Alloc \>::npos))\
 constexpr **bitset** (unsigned long long \_\_val) noexcept\
 const **\_Base** & **\_M\_base** () const noexcept\
 **\_Base** & **\_M\_base** () noexcept\
 **bitset**\< **\_Nb** \> & **flip** () noexcept\
 **bitset**\< **\_Nb** \> & **flip** (size\_t **\_\_pos**)\
 **bitset**\< **\_Nb** \> & **operator&=** (const **bitset**\< **\_Nb** \> &**\_\_rhs**) noexcept\
 **bitset**\< **\_Nb** \> **operator\<\<** (size\_t **\_\_pos**) const noexcept\
 **bitset**\< **\_Nb** \> & **operator\<\<=** (size\_t **\_\_pos**) noexcept\
 bool **operator==** (const **bitset**\< **\_Nb** \> &**\_\_rhs**) const noexcept\
 **bitset**\< **\_Nb** \> **operator\>\>** (size\_t **\_\_pos**) const noexcept\
 **bitset**\< **\_Nb** \> & **operator\>\>=** (size\_t **\_\_pos**) noexcept\
 reference **operator\[\]** (size\_t **\_\_pos**)\
 constexpr bool **operator\[\]** (size\_t **\_\_pos**) const\
 **bitset**\< **\_Nb** \> & **operator^=** (const **bitset**\< **\_Nb** \> &**\_\_rhs**) noexcept\
 **bitset**\< **\_Nb** \> & **operator\|=** (const **bitset**\< **\_Nb** \> &**\_\_rhs**) noexcept\
 **bitset**\< **\_Nb** \> **operator~** () const noexcept\
 **bitset**\< **\_Nb** \> & **reset** () noexcept\
 **bitset**\< **\_Nb** \> & **reset** (size\_t **\_\_pos**)\
 **bitset**\< **\_Nb** \> & **set** () noexcept\
 **bitset**\< **\_Nb** \> & **set** (size\_t **\_\_pos**, bool \_\_val=**true**)\
 template\<**typename** \_CharT , **typename** \_Traits , **typename** \_Alloc \> **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \> **to\_string** () const\
 template\<**typename** \_CharT , **typename** \_Traits \> **std::basic\_string**\< \_CharT, \_Traits, **std::allocator**\< \_CharT \> \> **to\_string** () const\
 template\<**typename** \_CharT \> **std::basic\_string**\< \_CharT, **std::char\_traits**\< \_CharT \>, **std::allocator**\< \_CharT \> \> **to\_string** () const\
 **std::basic\_string**\< char, **std::char\_traits**\< char \>, **std::allocator**\< char \> \> **to\_string** () const\
 template\<**class** \_CharT , **class** \_Traits , **class** \_Alloc \> **std::basic\_string**\< \_CharT, \_Traits, \_Alloc \> **to\_string** (\_CharT **\_\_zero**, \_CharT **\_\_one**=\_CharT('1')) const\
 template\<**class** \_CharT , **class** \_Traits \> **std::basic\_string**\< \_CharT, \_Traits, **std::allocator**\< \_CharT \> \> **to\_string** (\_CharT **\_\_zero**, \_CharT **\_\_one**=\_CharT('1')) const\
 template\<**class** \_CharT \> **std::basic\_string**\< \_CharT, **std::char\_traits**\< \_CharT \>, **std::allocator**\< \_CharT \> \> **to\_string** (\_CharT **\_\_zero**, \_CharT **\_\_one**=\_CharT('1')) const\
 **std::basic\_string**\< char, **std::char\_traits**\< char \>, **std::allocator**\< char \> \> **to\_string** (char **\_\_zero**, char **\_\_one**='1') const\

## Detailed Description

### template\<size\_t \_Nb\>

class std::\_\_debug::bitset\< \_Nb \>"Class std::bitset with additional safety/checking/debug instrumentation.

## Author

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