Title
Mistake in char_traits
Status
tc1
Section
[char.traits.specializations.wchar.t]
Submitter
Matt Austern

Created on 1998-07-01.00:00:00 last changed 163 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Remove the sentence in [char.traits.specializations.wchar.t] paragraph 3 which begins "The types streampos and wstreampos may be different..." .

Date: 1998-07-01.00:00:00

21.1.3.2, paragraph 3, says "The types streampos and wstreampos may be different if the implementation supports no shift encoding in narrow-oriented iostreams but supports one or more shift encodings in wide-oriented streams".

That's wrong: the two are the same type. The <iosfwd> summary in 27.2 says that streampos and wstreampos are, respectively, synonyms for fpos<char_traits<char>::state_type> and fpos<char_traits<wchar_t>::state_type>, and, flipping back to clause 21, we see in 21.1.3.1 and 21.1.3.2 that char_traits<char>::state_type and char_traits<wchar_t>::state_type must both be mbstate_t.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg132
1998-07-01 00:00:00admincreate