[clang] [C++] Expose nullptr_t from stddef.h in C++ mode (PR #154599)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 21 04:29:07 PDT 2025


================
@@ -16,7 +16,8 @@
 #define _NULLPTR_T
 
 #ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||                                                  \
+    (defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
----------------
AaronBallman wrote:

I don't know that it's possible to not vend `stddef.h`; do we know that every libc actually provides a complete header that works with Clang?

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


More information about the cfe-commits mailing list