名稱空間
變體
操作

標準庫標頭檔案 <cstdarg>

來自 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 標準庫中的 <stdarg.h>

此標頭檔案為 C 風格可變引數函式提供支援,其中 “預設引數提升” 的 C 定義C++ 定義取代。

目錄

型別

儲存 va_startva_argva_endva_copy 所需的資訊
(typedef) [編輯]

啟用對變長函式引數的訪問
(函式宏) [編輯]
訪問下一個變長函式引數
(函式宏) [編輯]
(C++11)
複製變長函式引數
(函式宏) [編輯]
結束變長函式引數的遍歷
(函式宏) [編輯]

[編輯] 摘要

namespace std {
  using va_list = /*see description*/ ;
}
#define va_arg(V, P) /*see description*/
#define va_copy(VDST, VSRC) /*see description*/
#define va_end(V) /*see description*/
#define va_start(V, P) /*see description*/

[編輯] 缺陷報告

下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。

缺陷報告 應用於 釋出時的行為 正確的行為
CWG 2645 C++98 C++ 定義了“預設引數提升”,但使用了其 C 定義 C++ 定義覆蓋 C 定義