Vector of bool This is a specialized version of vector, which is used for elements of type bool and optimizes for space.
It behaves like the unspecialized version of vector, with the following changes:
The storage is not necessarily an array of bool values, but the library implementation may optimize storage so that each value is stored in a single bit.
Elements are not constructed using the allocator object, but their value is directly set on the proper bit in the internal storage.
Member function flip and a new signature for member swap.
A special member type, reference, a class that accesses individual bits in the container’s internal storage with an interface that emulates a bool reference. Conversely, member type const_reference is a plain bool.
The pointer and iterator types used by the container are not necessarily neither pointers nor conforming iterators, although they shall simulate most of their expected behavior.