cpp/container/vector bool/reference

The specialization defines  as a publicly-accessible nested class. proxies the behavior of references to a single bit in.

The primary use of is to provide an lvalue that can be returned from.

Any reads or writes to a vector that happen via a potentially read or write to the entire underlying vector.

Member functions
{{member|{{small|std::vector ::reference::}}operator{{=}}|2= {{dcl begin}} {{dcl rev multi|num=1 reference& operator=( bool x ); reference& operator=( bool x ) noexcept; constexpr reference& operator=( bool x ) noexcept; }} {{dcl rev multi|num=2 reference& operator=( const reference& x ); reference& operator=( const reference& x ) noexcept; constexpr reference& operator=( const reference& x ) noexcept; }} {{dcl|num=3 constexpr const reference& operator=( bool x ) const noexcept; }} {{dcl end}}
 * dcl1=
 * since2=c++11|dcl2=
 * since3=c++20|dcl3=
 * dcl1=
 * since2=c++11|dcl2=
 * since3=c++20|dcl3=
 * since=c++23|1=

Assigns a value to the referenced bit.

Return value
}}

{{member|{{small|std::vector ::reference::}}operator bool|2= {{dcl begin}} {{dcl rev multi|until1=c++11|dcl1= operator bool const; operator bool const noexcept; constexpr operator bool const noexcept; }} {{dcl end}}
 * until2=c++20|dcl2=
 * dcl3=

Returns the value of the referenced bit.

Parameters
(none)

Return value
The referenced bit.

}}

{{member|{{small|std::vector ::reference::}}flip|2= {{dcl begin}} {{dcl rev multi|until1=c++11|dcl1= void flip; void flip noexcept; constexpr void flip noexcept; }} {{dcl end}}
 * until2=c++20|dcl2=
 * dcl3=

Inverts the referenced bit.

Parameters
(none)

Return value
(none)

}}