C++ Language/Std/Stl/CollectionClasses/SequenceCollections/VectorOfBool

A special specialization  compresses each item to a single bit.

For this special specialization, the indexing operator doesn't return. Instead, it returns a reference to an auxillary class that defines both  and a cast-operator for getting and setting its   value.

Additional information about a vector of bool (includes interactive examples)