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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 13 10:15:57 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/include/wchar.h:113
+#   error "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
+#endif
+
----------------
thakis wrote:
> """
> I know it's not my job to judge, but these lines might lead to unnecessary problems:
> I assume there's quite a few build scripts that look at this and say, "hey, I've got wchar.h, why not include it"
> ... this is not just an assumption. libc++ does the same thing with locale.h and ncurses's c++ example files greedily include it if they find it
> """
+1 in that this is also inconsistent with how we treat `#include <ranges>` in pre-C++20 modes, and so on. For better or worse, the precedent is pretty consistently "when a header isn't supported, including it should be a no-op."


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