This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofTC1 status.
Sync's return valueSection: 31.7.5.4[istream.unformatted]Status:TC1Submitter: Matt AusternOpened: 1998-08-06Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [istream.unformatted].
View all issues withTC1 status.
Discussion:
The Effects clause for sync() (27.6.1.3, paragraph 36) says that it"calls rdbuf()->pubsync() and, if that function returns -1... returns traits::eof()."
That looks suspicious, because traits::eof() is of typetraits::int_type while the return type of sync() is int.
Proposed resolution:
In 31.7.5.4[istream.unformatted], paragraph 36, change "returnstraits::eof()" to "returns-1".