Title
Return of gcount() after a call to gcount
Status
dup
Section
[istream.unformatted]
Submitter
Dietmar Kühl

Created on 1999-07-20.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Duplicate: 60

Date: 1999-07-20.00:00:00

It is not clear which functions are to be considered unformatted input functions. As written, it seems that all functions in [istream.unformatted] are unformatted input functions. However, it does not really make much sense to construct a sentry object for gcount(), sync(), ... Also it is unclear what happens to the gcount() if eg. gcount(), putback(), unget(), or sync() is called: These functions don't extract characters, some of them even "unextract" a character. Should this still be reflected in gcount()? Of course, it could be read as if after a call to gcount() gcount() return 0 (the last unformatted input function, gcount(), didn't extract any character) and after a call to putback() gcount() returns -1 (the last unformatted input function putback() did "extract" back into the stream). Correspondingly for unget(). Is this what is intended? If so, this should be clarified. Otherwise, a corresponding clarification should be used.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1722
1999-07-20 00:00:00admincreate