blob: edd106c001bcb785ddc0a2c5394069b8d41adc52 [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001// -*- C++ -*-
2//===--------------------------- cstddef ----------------------------------===//
3//
Howard Hinnantf5256e12010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00005//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00006// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00008//
9//===----------------------------------------------------------------------===//
10
11#ifndef _LIBCPP_CSTDDEF
12#define _LIBCPP_CSTDDEF
13
14/*
15 cstddef synopsis
16
17Macros:
18
19 offsetof(type,member-designator)
20 NULL
Howard Hinnant324bb032010-08-22 00:02:43 +000021
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000022namespace std
23{
24
25Types:
26
27 ptrdiff_t
28 size_t
29 max_align_t
30 nullptr_t
31
32} // std
33
34*/
35
36#include <__config>
Howard Hinnanted30e072010-06-02 18:53:22 +000037
Howard Hinnant08e17472011-10-17 20:05:10 +000038#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000039#pragma GCC system_header
Howard Hinnant08e17472011-10-17 20:05:10 +000040#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000041
Richard Smith45bae0b2015-10-09 00:26:50 +000042// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
43#include_next <stddef.h>
44#include <__nullptr>
45
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000046_LIBCPP_BEGIN_NAMESPACE_STD
47
48using ::ptrdiff_t;
49using ::size_t;
50
Chandler Carruthf84f6112014-02-21 08:37:30 +000051#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
52// Re-use the compiler's <stddef.h> max_align_t where possible.
53using ::max_align_t;
54#else
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000055typedef long double max_align_t;
Chandler Carruthf84f6112014-02-21 08:37:30 +000056#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000057
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000058_LIBCPP_END_NAMESPACE_STD
59
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000060#endif // _LIBCPP_CSTDDEF