名稱空間
變體
操作

標準庫標頭檔案 <cstddef>

來自 cppreference.com
 
 
標準庫標頭檔案
演算法
<algorithm>
<numeric>
字串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文字處理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
數值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
時間
<chrono> (C++11)
<ctime>
C 相容性
<ccomplex> (C++11/17/20*)
<ciso646> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此標頭檔案最初是 C 標準庫的 <stddef.h>

此標頭檔案是 工具庫 的一部分。

目錄

實現定義的空指標常量
(宏常量) [編輯]
標準佈局型別到指定成員的位元組偏移量
(函式宏) [編輯]

型別

sizeof 運算子返回的無符號整型
(型別定義) [編輯]
減去兩個指標時返回的有符號整型
(型別定義) [編輯]
(C++11)
空指標字面量 nullptr 的型別
(型別定義) [編輯]
微不足道的型別,其對齊要求與其他任何標量型別一樣大
(型別定義) [編輯]
(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 */

[編輯] 註解