31 Input/output library [input.output]

31.7 Formatting and manipulators [iostream.format]

31.7.5 Input streams [input.streams] Formatted input functions [istream.formatted] 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_­base​::​badbit is turned on289 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_­base​::​failure to be thrown.