std::bitset::operator[]

From Cppreference

Jump to: navigation, search
bool operator[]( size_t pos ) const;
(1)
reference operator[]( size_t pos );
(2)

Accesses the bit at position pos. The first version returns the value of the bit, the second version returns an object of type reference that allows modification of the value.

[edit] Parameters

pos - position of the bit to return

[edit] Return value

1) the value of the requested bit

2) an object of type reference with the value of the bit.

[edit] See also

test
accesses specific bit
(public member function)