標準ライブラリヘッダー <stddef.h>
From cppreference.com
このヘッダーは 型サポート ライブラリの一部であり、特に、追加の基本型と便利なマクロを提供します。
型 | ||
| 2つのポインタの差を計算したときに返される符号付き整数型 (typedef) | ||
| (C23) |
事前定義されたヌルポインター定数 nullptr の型 (typedef) | |
| (C11) |
他のどのスカラ型よりも大きいアライメント要求を持つ型 (typedef) | |
| sizeof 演算子が返す符号無し整数型 (typedef) | ||
定数 | ||
| 処理系定義のヌルポインタ定数 (macro constant) | ||
マクロ | ||
| 構造体の先頭から指定されたメンバまでのバイトオフセット (function macro) | ||
[編集] 概要
#define __STDC_VERSION_STDDEF_H__ 202311L typedef /* see description */ ptrdiff_t; typedef /* see description */ nullptr_t; typedef /* see description */ max_align_t; typedef /* see description */ wchar_t; typedef /* see description */ size_t; #define NULL /* see description */ #define unreachable() /* see description */ #define offsetof(P, D) /* see description */
実装が __STDC_LIB_EXT1__ を定義し、さらにユーザーコードが <stddef.h> のインクルード前に __STDC_WANT_LIB_EXT1__ を定義した場合のみ
#if defined(__STDC_WANT_LIB_EXT1__) typedef /* see description */ rsize_t; #endif