Title
Contradiction in codecvt::length's argument types
Status
tc1
Section
[locale.codecvt]
Submitter
Matt Austern

Created on 1998-09-18.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In [locale.codecvt], and also in [locale.codecvt.byname], change the stateT argument type on both member length() and member do_length() from

const stateT&

to

stateT&

In [locale.codecvt.virtuals], add to the definition for member do_length a paragraph:

Effects: The effect on the state argument is ``as if'' it called do_in(state, from, from_end, from, to, to+max, to) for to pointing to a buffer of at least max elements.

Date: 1998-09-18.00:00:00

The class synopses for classes codecvt<> (22.2.1.5) and codecvt_byname<> (22.2.1.6) say that the first parameter of the member functions length and do_length is of type const stateT&. The member function descriptions, however (22.2.1.5.1, paragraph 6; 22.2.1.5.2, paragraph 9) say that the type is stateT&. Either the synopsis or the summary must be changed.

If (as I believe) the member function descriptions are correct, then we must also add text saying how do_length changes its stateT argument.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg172
1998-09-18 00:00:00admincreate