[cfe-commits] r159448 - /cfe/trunk/lib/Headers/stddef.h
Douglas Gregor
dgregor at apple.com
Fri Jun 29 11:28:41 PDT 2012
Author: dgregor
Date: Fri Jun 29 13:28:41 2012
New Revision: 159448
URL: http://llvm.org/viewvc/llvm-project?rev=159448&view=rev
Log:
std::nullptr_t support in MS headers, from João Matos.
Modified:
cfe/trunk/lib/Headers/stddef.h
Modified: cfe/trunk/lib/Headers/stddef.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stddef.h?rev=159448&r1=159447&r2=159448&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stddef.h (original)
+++ cfe/trunk/lib/Headers/stddef.h Fri Jun 29 13:28:41 2012
@@ -52,6 +52,13 @@
# define NULL ((void*)0)
#endif
+#ifdef __cplusplus
+#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+namespace std { typedef decltype(nullptr) nullptr_t; }
+using ::std::nullptr_t;
+#endif
+#endif
+
#define offsetof(t, d) __builtin_offsetof(t, d)
#endif /* __STDDEF_H */
More information about the cfe-commits
mailing list