Original Post
Hi everyone, Lets say I have some functions that returns a boolean:
bool InitA();
bool InitB();
After reading the C++ spec draft, I still cannot tell if this would be correct:
bool result = true;
result &= InitA();
result &= InitB();
return result;
Is this correct or not? I know that the following would be correct:
bool result = true;
result = InitA() && result;
result = InitB() && result;
return result;
Is operator &= a bitwise AND operator, even for bool type? (b1 = b1 & b2 ). If so, does true have always the same bit representation for a given compiler? I know MSVC give true the value 1, but is this a standard?