va_arg

Function va_arg 

Source
pub unsafe fn va_arg<T: VaArgSafe>(ap: &mut VaListImpl<'_>) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Loads an argument of type T from the va_list ap and increment the argument ap points to.

§Safety

This function is only sound to call when:

  • there is a next variable argument available.
  • the next argument’s type must be ABI-compatible with the type T.
  • the next argument must have a properly initialized value of type T.

Calling this function with an incompatible type, an invalid value, or when there are no more variable arguments, is unsound.