Skip to content

Commit 158dec5

Browse files
committed
std::nullptr_t support in MS headers, from João Matos.
llvm-svn: 159448
1 parent b379fe5 commit 158dec5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/lib/Headers/stddef.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ typedef __WCHAR_TYPE__ wchar_t;
5252
# define NULL ((void*)0)
5353
#endif
5454

55+
#ifdef __cplusplus
56+
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
57+
namespace std { typedef decltype(nullptr) nullptr_t; }
58+
using ::std::nullptr_t;
59+
#endif
60+
#endif
61+
5562
#define offsetof(t, d) __builtin_offsetof(t, d)
5663

5764
#endif /* __STDDEF_H */

0 commit comments

Comments
 (0)