std::bitset< _Nb >::reference Class Reference
Utilities

`#include <bitset>`

## Public Member Functions

| reference (bitset &__b, size_t __pos) noexcept
| reference (const reference &)=default
reference & | flip () noexcept
| operator bool () const noexcept
reference & | operator= (bool __x) noexcept
reference & | operator= (const reference &__j) noexcept
bool | operator~ () const noexcept

## Friends

class | bitset

## Detailed Description

template<size_t _Nb>
class std::bitset< _Nb >::reference

This encapsulates the concept of a single bit. An instance of this class is a proxy for an actual bit; this way the individual bit operations are done as faster word-size bitwise instructions.

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.

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

Definition at line 802 of file bitset.

## Constructor & Destructor Documentation

## reference()

template<size_t _Nb>

std::bitset< _Nb >::reference::reference | ( | bitset & | __b,
|  | size_t | __pos )

inline noexcept

Definition at line 813 of file bitset.

## ~reference()

template<size_t _Nb>

std::bitset< _Nb >::reference::~reference | ( |  | ) |

inline noexcept

Definition at line 823 of file bitset.

## Member Function Documentation

## flip()

template<size_t _Nb>

reference & std::bitset< _Nb >::reference::flip | ( |  | ) |

inline noexcept

Definition at line 859 of file bitset.

## operator bool()

template<size_t _Nb>

std::bitset< _Nb >::reference::operator bool | ( |  | ) | const

inline noexcept

Definition at line 854 of file bitset.

## operator=() [1/2]

template<size_t _Nb>

reference & std::bitset< _Nb >::reference::operator= | ( | bool | __x | ) |

inline noexcept

Definition at line 828 of file bitset.

## operator=() [2/2]

template<size_t _Nb>

reference & std::bitset< _Nb >::reference::operator= | ( | const reference & | __j | ) |

inline noexcept

Definition at line 839 of file bitset.

## operator~()

template<size_t _Nb>

bool std::bitset< _Nb >::reference::operator~ | ( |  | ) | const

inline noexcept

Definition at line 850 of file bitset.

## Friends And Related Symbol Documentation

## bitset

template<size_t _Nb>

friend class bitset

friend

Definition at line 804 of file bitset.

The documentation for this class was generated from the following file:

- bitset