J
john
In TC++PL 3, on page 616, "class basic_ios" has the public members
"operator void *() const; // nonzero if !fail()
bool operator!() const { return fail(); }"
for using them in conditional statements in the style:
if(cin) // if( !void *(0) )
if(!cin) // if( cin.operator!()
Why isn't operator bool() used instead? For historical reasons?
"operator void *() const; // nonzero if !fail()
bool operator!() const { return fail(); }"
for using them in conditional statements in the style:
if(cin) // if( !void *(0) )
if(!cin) // if( cin.operator!()
Why isn't operator bool() used instead? For historical reasons?