title: What is the difference between if (cin >> x) and if (!(cin >> x).fail())?
body: <p>Is there a difference between these two? I know that one returns the stream to the <code>if</code> while the other returns a boolean right away, but is there a functional difference or are they equivalent?</p>