1) Behaves as an FormattedInputFunction. After constructing and checking the sentry object, which may skip leading whitespace, extracts a character and stores it to ch. If no character is available, sets failbit (in addition to eofbit that is set as required of a FormattedInputFunction).

2) Behaves as an FormattedInputFunction. After constructing and checking the sentry object, which may skip leading whitespace, extracts successive characters and stores them at successive locations of a character array whose first element is pointed to by s. The extraction stops if one of the following conditions are met:

a whitespace character (as determined by the ctype<CharT> facet) is found. The whitespace character is not extracted.

In either case, an additional null character value CharT() is stored at the end of the output. If no characters were extracted, sets failbit (the null character is still written, to the first position in the output). Finally, calls st.width(0) to cancel the effects of std::setw, if any.

3) Calls the appropriate extraction operator, given an rvalue reference to an input stream object (equivalent to st >> value).

Contents

Notes

Extracting a single character that is the last character of the stream does not set eofbit: this is different from other formatted input functions, such as extracting the last integer with operator>>, but this behavior matches the behavior of std::scanf with "%c" format specifier.