]> granicus.if.org Git - clang/commitdiff
std::nullptr_t support in MS headers, from João Matos.
authorDouglas Gregor <dgregor@apple.com>
Fri, 29 Jun 2012 18:28:41 +0000 (18:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 29 Jun 2012 18:28:41 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159448 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/stddef.h

index d7db826e676e81e642a3e89ab34ac80524e30fc2..eb919b57bcb9e20d37f267d1240c720d6740c28e 100644 (file)
@@ -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 */