Effects: If
is.good()
is
false,
calls
is.setstate(failbit). Otherwise,
prepares for formatted or
unformatted input
. First, if
is.tie()
is not a null pointer, the
function calls
is.tie()->flush()
to synchronize the output sequence with any associated external
C stream
. Except that this call can be suppressed if the put area of
is.tie()
is empty
. Further an implementation is allowed to defer the call to
flush
until a
call of
is.rdbuf()->underflow()
occurs
. If no such call occurs before the
sentry
object is destroyed, the call to
flush
may be eliminated entirely
.
If
noskipws is zero and
is.flags() & ios_base::skipws
is nonzero, the function extracts and discards each character as long as
the next available input character
c is a whitespace character
. If
is.rdbuf()->sbumpc()
or
is.rdbuf()->sgetc()
returns
traits::eof(),
the function calls
setstate(failbit | eofbit)
(which may throw
ios_base::failure)
.