Topic: bool ++ operator (was: Exceptions)
Author: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Date: Wed, 2 Mar 1994 06:12:02 GMT Raw View
sfc@datascope.com (Steve F. Cipolli (P/M)) writes:
>This, like the overflow possibilities inherent in the ++ operator
>for the new bool type leave serious questions in my mind as to the long term
>viability of C++ in critical applications.
There are NO overflow possibilities inheritent in the ++ operator for
the new bool type. Given
bool b;
the statements
b++;
b = 1;
b = true;
all have exactly the same effect. In general, a compiler is NOT
allowed to use a machine's increment instruction to implement the ++
operator for the bool type.
There may well be reasons to question the long term viability of C++ in
critical applications, but the bool operator ++ is not one of them.
--
Fergus Henderson - fjh@munta.cs.mu.oz.au