template <size_t N> class bitset;
true
or false
, ...).bool
elements, but optimized for space allocation: generally, each element occupies only one bit (which, on most systems, is eight times less than the smallest elemental type: char
).foo
, the expression foo[3]
accesses its fourth bit, just like a regular array accesses its elements. But because no elemental type is a single bit in most C++ environments, the individual elements are accessed as special references type (see bitset::reference).bool
specialization of vector (vector<bool>
).