<cstddef>

C 標準ライブラリ ヘッダー <stddef.h> をインクルードし、関連する名前を std 名前空間に追加します。 このヘッダーをインクルードすると、C 標準ライブラリ ヘッダーの外部リンケージで宣言された名前が、std 名前空間でも宣言されます。

Note

<cstddef > は型 byte をインクルードし、型 wchar_t はインクルードしません。

構文

#include <cstddef>

名前空間とマクロ

namespace std {
    using ptrdiff_t = see definition;
    using size_t = see definition;
    using max_align_t = see definition;
    using nullptr_t = decltype(nullptr);
}

#define NULL  // an implementation-defined null pointer constant
#define offsetof(type, member-designator)

パラメーター

ptrdiff_t
配列オブジェクト内の 2 つの添字の差を保持できる、実装定義の符号付き整数型。

size_t
任意のオブジェクトのサイズ (バイト単位) を格納するのに十分な大きさの実装定義の符号なし整数型。

max_align_t
アライメント要件が少なくともすべてのスカラー型の要件と同じであり、アライメント要件がすべてのコンテキストでサポートされている POD 型。

nullptr_t
nullptr 式の型のシノニム。 nullptr アドレスを取得することはできませんが、lvalue である別の nullptr_t オブジェクトのアドレスを取得することはできます。

byte クラス

enum class byte : unsigned char {};

template <class IntType>
    constexpr byte& operator<<=(byte& b, IntType shift) noexcept;
    constexpr byte operator<<(byte b, IntType shift) noexcept;
    constexpr byte& operator>>=(byte& b, IntType shift) noexcept;
    constexpr byte operator>>(byte b, IntType shift) noexcept;

constexpr byte& operator|=(byte& left, byte right) noexcept;
constexpr byte operator|(byte left, byte right) noexcept;
constexpr byte& operator&=(byte& left, byte right) noexcept;
constexpr byte operator&(byte left, byte right) noexcept;
constexpr byte& operator^=(byte& left, byte right) noexcept;
constexpr byte operator^(byte left, byte right) noexcept;
constexpr byte operator~(byte b) noexcept;

template <class IntType>
    IntType to_integer(byte b) noexcept;

関連項目

ヘッダー ファイル リファレンス
C++ 標準ライブラリの概要
C++ 標準ライブラリ内のスレッド セーフ