Petr Ovtchenkov - 2014-01-22

Looks you mean something like this:

std::ifstream sequenceFile( "nonexistent_file");
if ( !sequenceFile.is_open() ) {
  sequenceFile.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: http://www.cplusplus.com/reference/fstream/ifstream/open/

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

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

Opposite opinion is here: https://groups.google.com/forum/#!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...