|
|
|
AnUnformattedInputFunction is a stream input function that performs the following:
noskipws
argument set totrue, which performs the following:failbit
are enabled in this input stream'sexception mask ((exceptions()& failbit)!=0), throwsios_base::failure.sentry::operator bool()
, which is equivalent tobasic_ios::good.CharT
, writesCharT()
(the null character) to the first location of the array.eofbit
. If exceptions oneofbit
are enabled in this stream'sexception mask ((exceptions()& eofbit)!=0), throwsios_base::failure.badbit
in the input stream. If exceptions onbadbit
are enabled in this stream'sexception mask ((exceptions()& badbit)!=0), the exception is also rethrown.The following standard library functions areUnformattedInputFunctions.
eofbit
eofbit
eofbit
and does not modify gcountThe following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 61 | C++98 | it was unclear whether throwing an exception because of setting eofbit and/orfailbit will result in settingbadbit | exceptions thrown frombasic_ios::clear are not caught or rethrown |
LWG 160 | C++98 | the process of determining whether the exception caught is rethrown mentioned a non-existing function exception() | corrected toexceptions() |
LWG 243 | C++98 | the behavior whensentry::operator bool() returnsfalseor the sentry object fails to be constructed was not specified | specified |