Skip to content

Commit

Permalink
std::nullptr_t support in MS headers, from João Matos.
Browse files Browse the repository at this point in the history
llvm-svn: 159448
  • Loading branch information
DougGregor committed Jun 29, 2012
1 parent b379fe5 commit 158dec5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clang/lib/Headers/stddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 158dec5

Please sign in to comment.