Namespaces
Variants
Views
Actions

std::va_list

From cppreference.com
< cpp‎ | utility‎ | variadic
 
 
Utilities library
Language support
Type support (basic types, RTTI)
Library feature-test macros (C++20)
Dynamic memory management
Program utilities
Coroutine support (C++20)
Variadic functions
Debugging support
(C++26)
Three-way comparison
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)

 
 
Defined in header <cstdarg>
typedef /* unspecified */ va_list;

va_list is a complete object type (in practice, a unique built-in type or char*) suitable for holding the information needed by the macros va_start, va_copy, va_arg, and va_end.

If a va_list instance is created, passed to another function, and used via va_arg in that function, then any subsequent use in the calling function should be preceded by a call to va_end.

It is legal to pass a pointer to a va_list object to another function and then use that object after the function returns.

[edit] See also

enables access to variadic function arguments
(function macro) [edit]
(C++11)
makes a copy of the variadic function arguments
(function macro) [edit]
accesses the next variadic function argument
(function macro) [edit]
ends traversal of the variadic function arguments
(function macro) [edit]
C documentation for va_list