Petr Ovtchenkov - 2014-01-22

Looks you mean something like this:

std::ifstream sequenceFile( "nonexistent_file");
if ( !sequenceFile.is_open() ) { "existent_file" ); // expected clear state word
  assert( sequenceFile.good() == true );

In part of "which violate the C++ standard" message looks not correct too.

The same opinion here:

The function clears the stream's state flags on success (setting them to goodbit). In case of failure, failbit is set.

But is any reference to STANDARD or DRAFT that say the same? I don't see.

Opposite opinion is here:!topic/comp.lang.c++/ajqpgwCS0UU

(in case of fail use .clear() explicitly).

But nevertheless, at least it is reasonable about clear error state if open was successful...