From e25d3df6df39ecca4dad4647be2713cb85653634 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 29 Jun 2012 18:28:41 +0000 Subject: [PATCH] =?UTF-8?q?std::nullptr=5Ft=20support=20in=20MS=20headers,?= =?UTF-8?q?=20from=20Jo=C3=A3o=20Matos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159448 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/stddef.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h index d7db826e67..eb919b57bc 100644 --- a/lib/Headers/stddef.h +++ b/lib/Headers/stddef.h @@ -52,6 +52,13 @@ typedef __WCHAR_TYPE__ wchar_t; # 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 */