30 Input/output library [input.output]

30.7 Formatting and manipulators [iostream.format]

30.7.4 Input streams [input.streams]

30.7.4.2 Formatted input functions [istream.formatted]

30.7.4.2.1 Common requirements [istream.formatted.reqmts]

Each formatted input function begins execution by constructing an object of class sentry with the noskipws (second) argument false.
If the sentry object returns true, when converted to a value of type bool, the function endeavors to obtain the requested input.
If an exception is thrown during input then ios​::​badbit is turned on308 in *this's error state.
If (exceptions()&badbit) != 0 then the exception is rethrown.
In any case, the formatted input function destroys the sentry object.
If no exception has been thrown, it returns *this.
This is done without causing an ios​::​failure to be thrown.