Title
wbuffer_convert::state_type inconsistency
Status
c++11
Section
[depr.conversions.buffer]
Submitter
Bo Persson

Created on 2009-10-21.00:00:00 last changed 162 months ago

Messages

Date: 2011-03-24.15:58:06

Proposed resolution:

Modify the state_type typedef in the synopsis of [conversions.buffer] p.2 as shown [This makes the synopsis consistent with [conversions.buffer] p.9]:

namespace std {
template<class Codecvt,
  class Elem = wchar_t,
  class Tr = std::char_traits<Elem> >
class wbuffer_convert
  : public std::basic_streambuf<Elem, Tr> {
public:
  typedef typename TrCodecvt::state_type state_type;
  […]
};
}
Date: 2011-03-24.00:00:00

[ 2011-03-24 Madrid meeting ]

Moved to Immediate

Date: 2011-03-06.00:00:00

[ 2011-03-06: Howard drafts wording ]

Date: 2010-11-13.23:03:59

[ Batavia 2010: ]

Howard to draft wording, move to Review. Run it by Bill. Need to move this in Madrid.

Date: 2011-03-06.14:36:44

The synopsis for wbuffer_convert [conversions.buffer]/2 contains

typedef typename Tr::state_type   state_type; 

making state_type a synonym for (possibly) some char_traits<x>::state_type.

However, in paragraph 9 of the same section, we have

typedef typename Codecvt::state_type state_type;

The type shall be a synonym for Codecvt::state_type.

From what I can see, it might be hard to implement wbuffer_convert if the types were not both std::mbstate_t, but I cannot find a requirement that they must be the same type.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: immediate -> wp
2011-03-24 15:58:06adminsetmessages: + msg5675
2011-03-24 15:58:06adminsetstatus: open -> immediate
2011-03-06 19:27:01adminsetmessages: + msg5622
2011-03-06 19:27:01adminsetmessages: + msg5621
2010-11-13 23:03:59adminsetmessages: + msg5358
2010-11-13 23:03:59adminsetstatus: new -> open
2009-10-21 00:00:00admincreate