Hey folks.
We only mention UCS-2 in [depr.locale.stdcvt.req]
Referring to UCS-2 forces to carry a reference to ISO 10646:2003, as this encoding has long been obsoleted.
We could remove it entirely by rewording slightly, without changing any effect.
For the facet
codecvt_utf8:
The facet shall convert between UTF-8 multibyte sequences
and UCS-2 or UTF-32 (depending on the size of Elem)
within the program.
=>
For the facet
codecvt_utf16:
The facet shall convert between UTF-16 multibyte sequences
and UCS-2 or UTF-32 (depending on the size of Elem)
within the program
=>
The facet shall convert between UTF-16 multibyte sequences and UTF-16 or UTF-32 (depending on the size of Elem) within the program.
When converting to UTF-16 if any UTF-8 sequence encodes a codepoint outside of the BMP, the behavior is undefined.
What do you think?
Corentin
--