Why does std::basic_ios overload the unary logical negation operator?
<p>The C++ IO streams' base class <code>std::basic_ios</code> defines <code>operator void*()</code> to return <code>!fail()</code> and <code>operator!()</code> to return <code>fail()</code>. That makes me wonder why we need the <code>operator!()</code> at all. Certainly, <code>!is</code> would also work by implicitly calling <code>operator void*()</code> and negating its result. </p>

<p>Am I missing something here or is it purely for historical reasons that <code>std::basic_ios::operator!()</code> is defined? </p>

<p>A <a href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/dd524131a701fcf8/135926c014fb947d#135926c014fb947d" rel="nofollow">question on comp.lang.c++.moderated</a> didn't bring any answers either. </p>
