diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-06-29 18:28:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-06-29 18:28:41 +0000 |
commit | e25d3df6df39ecca4dad4647be2713cb85653634 (patch) | |
tree | 37b58684eeb510da5018c0c727c00c84dae291e0 | |
parent | 193f91ba7ed28709a1e730aedb3582353f9075d0 (diff) |
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
-rw-r--r-- | lib/Headers/stddef.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |