17 Language support library [support]

17.14 Other runtime support [support.runtime]

17.14.2 Header <cstdarg> synopsis [cstdarg.syn]

// all freestanding #define __STDC_VERSION_STDARG_H__ 202311L namespace std { using va_list = see below; } #define va_arg(V, P) see below #define va_copy(VDST, VSRC) see below #define va_end(V) see below #define va_start(V, ...) see below
The contents of the header <cstdarg> are the same as the C standard library header <stdarg.h>, with the following changes:
  • In lieu of the default argument promotions specified in ISO/IEC 9899:2024 6.5.2.2, the definition in [expr.call] applies.
  • The preprocessing tokens comprising the second and subsequent arguments to va_start (if any) are discarded.
    [Note 1: 
    va_start accepts a second argument for compatibility with prior revisions of C++.
    — end note]
See also: ISO/IEC 9899:2024, 7.16