I have seen ios::nocreate being used for
input-streams, most probably because the author thought it would be
more correct to specify nocreate "explicitly".  So you can simply
leave it out for input-streams.
For output streams, "nocreate" is probably the default, unless you
specify std::ios::trunc ? To be safe, you can open
the file for reading, check if it has been opened, and then decide
whether you want to create/replace or not. To my knowledge, even
older implementations support app,
ate and trunc (except for
app ?).
