[libcxx-commits] [PATCH] D148542: [libc++] cuchar redeclares ::mbstate_t
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 18 14:53:55 PDT 2023
philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.
In D148542#4274624 <https://reviews.llvm.org/D148542#4274624>, @iana wrote:
> In D148542#4274570 <https://reviews.llvm.org/D148542#4274570>, @philnik wrote:
>
>> Why do we want to change this? The current version looks just fine.
>
> The redeclaration becomes an error with clang modules when __mbstate.h and cuchar are in different modules.
Please add that information to the commit message.
LGTM with comments addressed.
================
Comment at: libcxx/include/cuchar:52
+#if !defined(_LIBCPP_CXX03_LANG)
+# include <__mbstate_t.h> // provides ::mbstate_t
----------------
I don't think this check makes sense. It seems like right now we might have this symbol in C++03 in some headers, but not in `cuchar`. If we only want this in C++11 we should guard it in `__mbstate_t.h`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148542/new/
https://reviews.llvm.org/D148542
More information about the libcxx-commits
mailing list