標準庫標頭檔案 <cstddef>
來自 cppreference.com
此標頭檔案最初是 C 標準庫的 <stddef.h>。
此標頭檔案是 工具庫 的一部分。
宏 | ||
實現定義的空指標常量 (宏常量) | ||
標準佈局型別到指定成員的位元組偏移量 (函式宏) | ||
型別 | ||
由 sizeof 運算子返回的無符號整型 (型別定義) | ||
減去兩個指標時返回的有符號整型 (型別定義) | ||
(C++11) |
空指標字面量 nullptr 的型別 (型別定義) | |
(C++11) |
微不足道的型別,其對齊要求與其他任何標量型別一樣大 (型別定義) | |
(C++17) |
位元組型別 (列舉) | |
函式 | ||
(C++17) |
將 std::byte 轉換為整數 (函式模板) |
[編輯] 概要
namespace std { using ptrdiff_t = /* see description */; using size_t = /* see description */; using max_align_t = /* see description */; using nullptr_t = decltype(nullptr); enum class byte : unsigned char {}; // byte type operations 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 /* see description */ #define offsetof(P, D) /* see description */