[libcxx-commits] [libcxx] [libc++] stddef.h needs to #include_next for the new clang __need_ macros (PR #86252)

Ian Anderson via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 26 16:07:21 PDT 2024


================
@@ -7,16 +7,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__need_ptrdiff_t) || defined(__need_size_t) || defined(__need_wchar_t) || defined(__need_NULL) ||          \
-    defined(__need_wint_t)
+#if defined(__need_ptrdiff_t) || defined(__need_size_t) || defined(__need_rsize_t) || defined(__need_wchar_t) ||       \
----------------
ian-twilightcoder wrote:

I don't think we can unconditionally declare nullptr_t. If e.g. `__need_size_t` is set, then `nullptr_t` shouldn't get declared. I'm not sure if that's for POSIX conformance or what, but it seems to be important when I talk to people implementing low level headers.

https://github.com/llvm/llvm-project/pull/86252


More information about the libcxx-commits mailing list