[PATCH 2/3]: C++20 P0482R6 and C2X N2653: Implement mbrtoc8, c8rtomb, char8_t
Tom Honermann
tom@honermann.net
Tue Mar 1 03:40:14 GMT 2022
On 2/28/22 6:01 PM, Joseph Myers wrote:
> On Sun, 27 Feb 2022, Tom Honermann via Libc-alpha wrote:
>
>> This patch provides implementations for the mbrtoc8 and c8rtomb functions
>> adopted for C++20 via WG21 P0482R6 [1] and for C2X via WG14 N2653 [2]. It also
>> provides the char8_t typedef adopted for C2X via WG14 N2653 [2].
>>
>> The mbrtoc8 and c8rtomb functions are declared in uchar.h in C2X mode or when
>> the _GNU_SOURCE macro or C++20 __cpp_char8_t feature test macro is defined.
>>
>> The char8_t typedef is declared in uchar.h in C2X mode or when the _GNU_SOURCE
>> macro is defined and the C++20 __cpp_char8_t feature test macro is not defined
>> (if __cpp_char8_t is defined, then char8_t is a builtin type).
> You should almost never have "defined __USE_GNU || ..." in header
> conditionals, because _GNU_SOURCE implies the other feature test macros.
Ah, right. Thank you, a corrected patch is attached.
Tom.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: n2653-2.patch
Type: text/x-patch
Size: 29115 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20220228/9df92677/attachment-0001.bin>
More information about the Libc-alpha
mailing list