[libcxx-commits] [PATCH] D148542: [libc++] cuchar redeclares ::mbstate_t when it's in its own clang module
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 26 15:12:49 PDT 2023
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
So hard for such a small patch! Thanks for working through this with me!
================
Comment at: libcxx/include/__mbstate_t.h:19-22
+// The goal of this header is to provide mbstate_t without requiring all of
+// <wchar.h> or <uchar.h>, which is not always available. Indeed, we need
+// that type even when we don't have support for wchar_t, because several
// types like std::fpos are defined in terms of mbstate_t.
----------------
================
Comment at: libcxx/include/__mbstate_t.h:31-35
+#elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next(<wchar.h>)
+# include_next <wchar.h>
#else
# error "The library was configured without support for wide-characters, but we don't know how to get the definition of mbstate_t without <wchar.h> on your platform."
#endif
----------------
================
Comment at: libcxx/include/wchar.h:126
+# else
+# include <__mbstate_t.h>
# endif
----------------
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