This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

### 2479. Unclear how `wbuffer_convert` uses `cvtstate`

Section: D.23.3 [depr.conversions.buffer] Status: New Submitter: Jonathan Wakely Opened: 2015-03-04 Last modified: 2017-04-22

Priority: 4

View other active issues in [depr.conversions.buffer].

View all other issues in [depr.conversions.buffer].

View all issues with New status.

Discussion:

How does `wbuffer_convert` use the `cvtstate` member?

Is the same conversion state object used for converting both the get and put areas? That means a read which runs out of bytes halfway through a multibyte character will leave some shift state in cvtstate, which would then be used by a following write, even though the shift state of the get area is unrelated to the put area.

Proposed resolution: