aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Headers/stddef.h7
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 */