Title
Inconsistent types for basic_istream::ignore()
Status
tc1
Section
[istream.unformatted]
Submitter
Greg Comeau, Dietmar Kühl

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

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In [istream.unformatted] paragraph 23 and 24, change both uses of int in the description of ignore() to streamsize.

Date: 1999-07-23.00:00:00

In [istream] the function ignore() gets an object of type streamsize as first argument. However, in [istream.unformatted] paragraph 23 the first argument is of type int.

As far as I can see this is not really a contradiction because everything is consistent if streamsize is typedef to be int. However, this is almost certainly not what was intended. The same thing happened to basic_filebuf::setbuf(), as described in issue 173.

Darin Adler also submitted this issue, commenting: Either 27.6.1.1 should be modified to show a first parameter of type int, or 27.6.1.3 should be modified to show a first parameter of type streamsize and use numeric_limits<streamsize>::max.

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