(bool)true == (int)1すべてのC ++コンパイラを想定できますか?
bool t = true; int n = 1; if (t == n) {...} ;
(int) trueは1整数値ですが、if (pointer)ifの場合、then部分を通過するようなものですpointer != 0。あなたが本当であると想定できる唯一のことはfalse == 0、そしてtrue != 0(そしてキャストtrueされた1ときに評価されるint)