415. behavior of std::ws

Section: 30.7.4.4 [istream.manip] Status: CD1 Submitter: Martin Sebor Opened: 2003-09-18 Last modified: 2016-02-10

Priority: Not Prioritized

View all issues with CD1 status.

Discussion:

According to 27.6.1.4, the ws() manipulator is not required to construct the sentry object. The manipulator is also not a member function so the text in 27.6.1, p1 through 4 that describes the exception policy for istream member functions does not apply. That seems inconsistent with the rest of extractors and all the other input functions (i.e., ws will not cause a tied stream to be flushed before extraction, it doesn't check the stream's exceptions or catch exceptions thrown during input, and it doesn't affect the stream's gcount).

Proposed resolution:

Add to 30.7.4.4 [istream.manip], immediately before the first sentence of paragraph 1, the following text:

Behaves as an unformatted input function (as described in 27.6.1.3, paragraph 1), except that it does not count the number of characters extracted and does not affect the value returned by subsequent calls to is.gcount(). After constructing a sentry object...

[Post-Kona: Martin provided wording]