Namespaces
Variants

Standard library header <cstddef>

From cppreference.net
Standard library headers

该头文件最初作为 <stddef.h> 存在于C标准库中。

此头文件属于 utility 库的一部分。

目录

实现定义的空指针常量
(宏常量)
标准布局类型 起始处到指定成员的字节偏移量
(函数宏)

类型

sizeof 运算符返回的无符号整数类型
(类型定义)
两个指针相减时返回的有符号整数类型
(类型定义)
(C++11)
空指针字面量 nullptr 的类型
(类型定义)
对齐要求与任何其他标量类型同样严格的基本类型
(类型定义)
(C++17)
字节类型
(枚举)

函数

(C++17)
转换 std::byte 为整数
(函数模板)

概要

namespace std {
  using ptrdiff_t = /* 见描述 */;
  using size_t = /* 见描述 */;
  using max_align_t = /* 见描述 */;
  using nullptr_t = decltype(nullptr);
  enum class byte : unsigned char {};
  // 字节类型操作
  template<class IntType>
    constexpr byte& operator<<=(byte& b, IntType shift) noexcept;
  template<class IntType>
    constexpr byte operator<<(byte b, IntType shift) noexcept;
  template<class IntType>
    constexpr byte& operator>>=(byte& b, IntType shift) noexcept;
  template<class IntType>
    constexpr byte operator>>(byte b, IntType shift) noexcept;
  constexpr byte& operator|=(byte& l, byte r) noexcept;
  constexpr byte operator|(byte l, byte r) noexcept;
  constexpr byte& operator&=(byte& l, byte r) noexcept;
  constexpr byte operator&(byte l, byte r) noexcept;
  constexpr byte& operator^=(byte& l, byte r) noexcept;
  constexpr byte operator^(byte l, byte r) noexcept;
  constexpr byte operator~(byte b) noexcept;
  template<class IntType>
    constexpr IntType to_integer(byte b) noexcept;
}
#define NULL /* 见描述 */
#define offsetof(P, D) /* 见描述 */

注释