[libc-commits] [libc] [libc] Add support for wchar_t in StringConverter. (PR #211867)
Alex Strelnikov via libc-commits
libc-commits at lists.llvm.org
Wed Jul 29 08:52:18 PDT 2026
================
@@ -185,22 +211,59 @@ LIBC_INLINE ErrorOr<char8_t> CharacterConverter::pop_utf8() {
return static_cast<char8_t>(output);
}
+LIBC_INLINE ErrorOr<wchar_t> CharacterConverter::pop_wchar() {
+#if defined(LIBC_TYPES_WCHAR_T_IS_UTF32)
+ ErrorOr<char32_t> Result = pop_utf32();
+ return Result ? ErrorOr<wchar_t>(static_cast<wchar_t>(*Result))
----------------
strel-12 wrote:
SGTM, done.
https://github.com/llvm/llvm-project/pull/211867
More information about the libc-commits
mailing list