C++ Logo

sg16

Advanced search

Re: New C23 functions c8rtomb and mbrtoc8

From: Tom Honermann <tom_at_[hidden]>
Date: Fri, 26 Jan 2024 09:56:48 -0500
On 1/26/24 7:05 AM, Jonathan Wakely via SG16 wrote:
> https://en.cppreference.com/w/c/string/multibyte/mbrtoc8
> https://en.cppreference.com/w/c/string/multibyte/c8rtomb
>
> Do we want these in C++26?
They were already added (in the std namespace) in C++20 (see
[cuchar.syn] <http://eel.is/c++draft/cuchar.syn> and [c.mb.wcs]
<http://eel.is/c++draft/c.mb.wcs> p7-11).
>
> If we rebase C++ on C2x we'll pick these up as part of <cuchar>. I
> assume that's OK.

Yes, that is expected. We will need to adjust the wording for the linked
sections above when we rebase:

[cuchar.syn]p1 <http://eel.is/c++draft/cuchar.syn#1>:

    The contents and meaning of the header <cuchar> are the same as the
    C standard library header <uchar.h>, except that it declares the
    additional mbrtoc8 and c8rtomb functions and does not declare types
    _char8_t, _char16_t_,_ nor char32_t.

[c.mb.wcs] <http://eel.is/c++draft/c.mb.wcs>:

    Align the specification for these functions with the other functions
    in that section to give them the "These functions have the semantics
    specified in the C standard library" treatment with appropriate "See
    also: ISO/IEC 9899:..." notes.

Tom.

>
>

Received on 2024-01-26 14:56:51