boolから整数型に変換する時、falseは0に、trueは1になる

N1905

[conv.integral]

If the destination type is bool, see 4.12. If the source type is bool, the value false is converted to zero and the value true is converted to one.

[conv.bool]

An rvalue of arithmetic, enumeration, pointer, or pointer to member type can be converted to an rvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false any other value is converted to true.

整数型からboolに変換する時は、0ならfalseに、それ以外ならtrueになる。