An UnformattedInputFunction is a stream input function that performs the following:
1)Constructs an object of type
basic_istream::sentrywith automatic storage duration and with the
noskipws
argument set to
true, which performs the following:
failbit
are enabled in this input stream's exception mask ((exceptions() & failbit) != 0), throws ios_base::failure.Checks the status of the sentry by calling
sentry::operator bool()
, which is equivalent to
basic_ios::good.
CharT
, writes CharT()
(the null character) to the first location of the array.eofbit
. If exceptions on eofbit
are enabled in this stream's exception mask ((exceptions() & eofbit) != 0), throws ios_base::failure.badbit
in the input stream. If exceptions on badbit
are enabled in this stream's exception mask ((exceptions() & badbit) != 0), the exception is also rethrown.3) In any event, whether terminating by exception or returning, the sentry's destructor is called before leaving this function.
[edit] Standard libraryThe following standard library functions are UnformattedInputFunctions.
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 ofeofbit
and/or failbit
will result in setting badbit
exceptions thrown from basic_ios::clear
exception()
corrected to exceptions() LWG 243 C++98 the behavior when sentry::operator bool()
returns false
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4