I just came onto a project with a pretty huge code base.
I\'m mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic.
It side-steps a compiler warning. Try this:
int _tmain(int argc, _TCHAR* argv[]) { int foo = 5; bool bar = foo; bool baz = !!foo; return 0; }
The 'bar' line generates a "forcing value to bool 'true' or 'false' (performance warning)" on MSVC++, but the 'baz' line sneaks through fine.