Would VS2008 c++ compiler optimize the following if statement?
问题 if (false == x) { ...} as opposed to: if (!x) { ... } and if (false == f1()) { ...} as opposed to: if (!f1()) { ... } I think the if(false == ... version is more readable. Do you agree, or have another trick you can propose? Will it be just as fast? Thanks. This is why I do not like !x: if (25 == a->function1(12345, 6789) && 45 == b->function1(12345, 6789) && !c->someOtherFunction(123)) { ... } The following seems better: if (25 == a->function1(12345, 6789) && 45 == b->function1(12345, 6789)