Title
do_in/do_out operation on state unclear
Status
nad editorial
Section
[locale.codecvt.virtuals]
Submitter
Alberto Barbati

Created on 2002-12-24.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

The submitter believes that standard already provides an affirmative answer to the question. However, the current wording has induced a few library implementors to make the incorrect assumption that do_in()/do_out() always consume at least one internal character when they succeed.

The submitter also believes that the proposed resolution is not in conflict with the related issue 76. Moreover, by explicitly allowing operations on state to produce characters, a codecvt implementation may effectively implement N-to-M translations without violating the "one character at a time" principle described in such issue. On a side note, the footnote in the proposed resolution of issue 76 that informally rules out N-to-M translations for basic_filebuf should be removed if this issue is accepted as valid.

Date: 2010-10-21.18:28:33

Proposed resolution:

Add a note at the end of [locale.codecvt.virtuals], paragraph 3:

[Note: As a result of operations on state, it can return ok or partial and set from_next == from and to_next != to. --end note]

Date: 2002-12-24.00:00:00

this DR follows the discussion on the previous thread "codecvt::do_in not consuming external characters". It's just a clarification issue and not a request for a change.

Can do_in()/do_out() produce output characters without consuming input characters as a result of operation on state?

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2464
2010-10-21 18:28:33adminsetmessages: + msg2463
2002-12-24 00:00:00admincreate