Split <stddef.h> out of <cstddef>.

There are a bunch of macros (__need_size_t etc) that request just one piece of
<stddef.h>; if any one of these is defined, we just directly include the
underlying header.

Note that <stddef.h> provides a ::nullptr_t. We don't want that available to
includers of <cstddef>, so instead of following the usual pattern where <cfoo>
includes <foo.h> then pulls things from :: into std:: with using-declarations,
we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for
the definition of std::nullptr_t.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith
2015-10-08 22:25:27 +00:00
parent 4ccd90dd42
commit 759cd0e86b
3 changed files with 80 additions and 2 deletions

View File

@@ -34,10 +34,10 @@ Types:
*/
#include <__config>
// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
#include_next <stddef.h>
#include <__nullptr>
#include <stddef.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif