If I define
bool y = true;
bool n = false;
is the bit-wise content of the 1-byte storage of y and n mandated by the standard? If so, which are those two contents? If not, then how is the comparison between bools themselves or between bools and other integer types handled?
Standard does not require any bit representation for
bool, it only requires that there are two valuestrueandfalse- and in particular, it doesn't seem to require that there is only one representation for each value ([basic.fundamental]#10):It is required that
trueis mapped to1andfalseis mapped to0when convertingbooltoint([conv.prom]#6):