sg22-c-cpp-standard-compatibility / sg-compatibility

A joint Study Group between the C (WG14) and C++ (WG21) Committees to ensure the longterm synchronization and cooperation of the C and C++ programming languages where any mutual interests lie.
1 stars 0 forks source link

Rebasing C++26 on C23: mbrtoc8 and c8rtomb #38

Open tahonermann opened 7 months ago

tahonermann commented 7 months ago

The mbrtoc8() and c8rtomb() functions were added to C++20 and C23. Since C++20 is currently based on C17, the additions for C++20 necessitated adding wording to both standards. The following changes to the C++ standard will be needed when it is rebased on C23. These changes were previously discussed on the SG16 mailing list at https://lists.isocpp.org/sg16/2024/01/4123.php.

[cuchar.syn]p1:

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]:

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.