Suppose I have some legacy code which cannot be changed unless a bug is discovered, and it contains this code:
bool data[32
From 3.9.1/7:
Types bool , char , char16_t , char32_t , wchar_t , and the signed and unsigned integer types are collectively called integral types. A synonym for integral type is integer type . The representations of integral types shall define values by use of a pure binary numeration system.
Given this I can't see any possible implementation of bool
that wouldn't represent false as all 0 bits.