1 // -*- C++ -*- 2 //===--------------------------- cstddef ----------------------------------===// 3 // 4 // The LLVM Compiler Infrastructure 5 // 6 // This file is dual licensed under the MIT and the University of Illinois Open 7 // Source Licenses. See LICENSE.TXT for details. 8 // 9 //===----------------------------------------------------------------------===// 10 11 #ifndef _LIBCPP_CSTDDEF 12 #define _LIBCPP_CSTDDEF 13 14 /* 15 cstddef synopsis 16 17 Macros: 18 19 offsetof(type,member-designator) 20 NULL 21 22 namespace std 23 { 24 25 Types: 26 27 ptrdiff_t 28 size_t 29 max_align_t 30 nullptr_t 31 32 } // std 33 34 */ 35 36 #include <__config> 37 38 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 39 #pragma GCC system_header 40 #endif 41 42 // Don't include our own <stddef.h>; we don't want to declare ::nullptr_t. 43 #include_next <stddef.h> 44 #include <__nullptr> 45 46 _LIBCPP_BEGIN_NAMESPACE_STD 47 48 using ::ptrdiff_t; 49 using ::size_t; 50 51 #if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \ 52 defined(__DEFINED_max_align_t) 53 // Re-use the compiler's <stddef.h> max_align_t where possible. 54 using ::max_align_t; 55 #else 56 typedef long double max_align_t; 57 #endif 58 59 _LIBCPP_END_NAMESPACE_STD 60 61 #endif // _LIBCPP_CSTDDEF 62