From: Douglas Gregor Date: Fri, 29 Jun 2012 18:28:41 +0000 (+0000) Subject: std::nullptr_t support in MS headers, from João Matos. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e25d3df6df39ecca4dad4647be2713cb85653634;p=clang std::nullptr_t support in MS headers, from João Matos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159448 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 */