Hi Andrew,
I was hoping was that we could at least have a compile option. So we could
turn it on if required. I would definitely mandate it in our organization
at least. I am sure others would too.
We have a prepared list of common errors C++ novices make and the
accidental boolean is always
Maybe I gave a too simple example on my first post. Another example common
error which would be prevented by blocking implicit bool conversion might be:
if (strcmp(szMyName, "Peter")) printf("Hello Peter");
This bad error currently just slips through. If we gave an option to only
accept ex
if (!hFile) return;
If the compiler had forced the writer to make a real comparison, I am sure
the bug would never have made it into release. The problem here is
INVALID_HANDLE_VALUE is -1 not 0.
At 10:10 PM 4/10/2005, Richard Guenther wrote:
On 10/4/05, Peter Lupton NCH Swift Sou