03-02-2006, 09:29 PM
The second sentence in Rule 12.6 says \"Expressions that are effectively Boolean should not be used as operands to operators other than (&&, || and !).\"
This makes sense for most operators, but what about the simple assignment operator?
Perhaps a disclaimer \"other than assignment\" could be added?
This makes sense for most operators, but what about the simple assignment operator?
Code:
bool a;
a = (b == c); /* is this allowed? */
Perhaps a disclaimer \"other than assignment\" could be added?