[libcxx-commits] [PATCH] D97870: [libc++] Add missing header <cuchar>

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 6 11:19:13 PDT 2021


ldionne added a comment.

In D97870#2859714 <https://reviews.llvm.org/D97870#2859714>, @Quuxplusone wrote:

> In the spirit of my "remove `_LIBCPP_CXX03_LANG`" patch series: We care about compiling in C++03 mode only with Clang, right? So how about doing some macro magic in `<__config>` that makes our `char16_t` an alias for Clang's uglified built-in `__char16_t` on-Clang-in-C++03-mode? And then on every other compiler we just use `char16_t` directly.

We already do, and it's broken! https://github.com/llvm/llvm-project/blob/main/libcxx/include/__config#L441

It's broken because in some cases, even in C++03 mode, the underlying C library tries to do the exact same thing and provide a `typedef` for `char16_t`. We end up trying to redefine that `typedef` in `<__config>`, and that doesn't work. I think that what we want to do here is instead not try to backport `<uchar.h>` to C++03 (as I do in the patch right now).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97870



More information about the libcxx-commits mailing list