This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
172. Inconsistent types forbasic_istream::ignore()
Section: 31.7.5.4 [istream.unformatted] Status: TC1 Submitter: Greg Comeau, Dietmar Kühl Opened: 1999-07-23 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [istream.unformatted].
View all issues with TC1 status.
Discussion:
In 31.7.5.2 [istream] the function ignore()
gets an object of type streamsize
as first argument. However, in 31.7.5.4 [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(i).
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.
Proposed resolution:
In 31.7.5.4 [istream.unformatted] paragraph 23 and 24, change both uses of int
in the description of ignore()
to streamsize
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4