664. do_unshift for codecvt<char, char, mbstate_t>

Section: 25.4.1.4.2 [locale.codecvt.virtuals] Status: CD1 Submitter: Thomas Plum Opened: 2007-04-16 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [locale.codecvt.virtuals].

View all issues with CD1 status.

Discussion:

25.4.1.4.2 [locale.codecvt.virtuals], para 7 says (regarding do_unshift):

Effects: Places characters starting at to that should be appended to terminate a sequence when the current stateT is given by state.237) Stores no more than (to_limit - to) destination elements, and leaves the to_next pointer pointing one beyond the last element successfully stored. codecvt<char, char, mbstate_t> stores no characters.

The following objection has been raised:

Since the C++ Standard permits a nontrivial conversion for the required instantiations of codecvt, it is overly restrictive to say that do_unshift must store no characters and return noconv.

[Plum ref _222152Y50]

Proposed resolution:

Change 25.4.1.4.2 [locale.codecvt.virtuals], p7:

Effects: Places characters starting at to that should be appended to terminate a sequence when the current stateT is given by state.237) Stores no more than (to_limit -to) destination elements, and leaves the to_next pointer pointing one beyond the last element successfully stored. codecvt<char, char, mbstate_t> stores no characters.