[PATCH v2 1/4] include: Fix undefined char16_t in C11.
Jacek Caban
jacek at codeweavers.com
Wed Sep 23 09:44:26 CDT 2020
Hi Kevin,
On 18.09.2020 00:49, Kevin Puetz wrote:
> In c++11 char16_t is a distinct fundamental type,
> but in c11 it is merely a typedef in <uchar.h>.
>
> Explicitly mention char16_t only in c++11 (where it is built-in),
> otherwise define WCHAR to match u"...", without naming char16_t.
>
> Remove WINE_UNICODE_CHAR16; it is now the default when supported.
I like the part that uses __cpp_unicode_literals, it would make our
headers much more C++ friendly by default.
I'm less sure if we want __CHAR16_TYPE__. In practice, it will only
affect C, which is much less strict about types anyway. We assume in
Wine code base that WCHAR is 16-bit unsigned integer. If __CHAR16_TYPE__
is something else, we shouldn't use it. If it's the same, then there is
little point in using it. I think that the original problem is fixed by
__cpp_unicode_literals change alone, so how about doing just that?
Thanks,
Jacek
More information about the wine-devel
mailing list