标准库标头 <cstddef>

来自cppreference.com
< cpp‎ | header


 
 
标准库头
 

此标头原作为 <stddef.h> 存在于 C 标准库。

此头文件是工具库的一部分。

目录

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

类型

sizeof 运算符返回的无符号整数类型
(typedef)[编辑]
两个指针相减返回的有符号整数类型
(typedef)[编辑]
(C++11)
空指针字面量 nullptr 的类型
(typedef)[编辑]
具有不小于任何基础类型的内存对齐需求的平凡类型
(typedef)[编辑]
(C++17)
字节类型
(枚举)[编辑]

函数

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

[编辑]概要

namespace std {using ptrdiff_­t =/* 见描述 */;using size_­t =/* 见描述 */;using max_­align_­t =/* 见描述 */;using nullptr_­t = decltype(nullptr);   enumclass byte :unsignedchar{};   // 字节类型运算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) /* 见描述 */

[编辑]注解

close