[libcxx-commits] [PATCH] D111265: [libc++] Add an option to disable wide character support in libc++

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 6 13:26:52 PDT 2021


ldionne added a comment.

Calling out the only two things that are tricky in this patch IMO. If someone's willing to take a look at this patch, it would be great.



================
Comment at: libcxx/include/__mbstate_t.h:1
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
----------------
I'm calling out attention on this file since I'm not really satisfied by the solution, but don't know how to make it better. Suggestions welcome.

This patch was developed on macOS so obviously some of this might not fly out-of-the-box on Linux, but we should find a way to make it work on all platforms, all the time.


================
Comment at: libcxx/src/locale.cpp:4552
+  // TODO(ldionne): How should we handle that when we don't have wchar_t?
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
   // First convert the MBS into a wide char then attempt to narrow it using
----------------
Calling this out too, I'm not entirely sure how to handle this properly when `wchar_t` isn't supported.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111265/new/

https://reviews.llvm.org/D111265



More information about the libcxx-commits mailing list