Make sure wchar_t is wide enough to hold all Unicode code-points
All checks were successful
continuous-integration/drone/push Build is passing

Too bad if it isn't.
This commit is contained in:
apio 2022-12-18 17:14:12 +01:00
parent 6c3b7672a0
commit 4a7e48ed5d
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -1,6 +1,8 @@
#include <luna/CString.h>
#include <luna/Utf8.h>
static_assert(__WCHAR_MAX__ > 0x10ffff);
static Result<usize> utf8_char_length(char c)
{
if ((c & 0b11111000) == 0b11110000) return 4;