About 51 results
Open links in new tab
  1. variadic functions - Variable number of arguments in C

    505 In C++11 you have two new options, as the Variadic arguments reference page in the Alternatives section states: Variadic templates can also be used to create functions that take …

  2. c++ - Variadic templates - Stack Overflow

    Sep 3, 2010 · variadic templates (accepting an arbitrary number of parameters) The purpose of the variadic member template is to forward arguments to the object referred to by ptr.

  3. Variadic templates in C++ and how they work - Stack Overflow

    May 28, 2020 · The variadic template makes the compiler generate all of these "on demand" and saves you from writing them all out. One way to look at it is that regular function templates …

  4. Technically, how do variadic functions work? How does printf work?

    Apr 16, 2014 · I know I can use va_arg to write my own variadic functions, but how do variadic functions work under the hood, i.e. on the assembly instruction level? E.g., how is it possible …

  5. Specifying one type for all arguments passed to variadic function …

    Specifying one type for all arguments passed to variadic function or variadic template function w/out using array, vector, structs, etc? Asked 15 years, 3 months ago Modified 12 months ago …

  6. Forward an invocation of a variadic function in C

    In C, is it possible to forward the invocation of a variadic function? As in,

  7. How to make a variadic macro (variable number of arguments)

    How to make a variadic macro (variable number of arguments) Asked 16 years, 9 months ago Modified 2 years, 5 months ago Viewed 286k times

  8. Simulate variadic templates in C# - Stack Overflow

    C# generics are not the same as C++ templates. C++ templates are expanded compiletime and can be used recursively with variadic template arguments. The C++ template expansion is …

  9. How to assign variadic/variable arguments in C++

    Feb 21, 2022 · That beeing set, variadic arguments are a very unsafe way of passing variables. In your example, if someone changes the type of a, b, and c to another type, you will run into …

  10. Do variadic functions need to have a different calling convention …

    Jul 8, 2023 · In C, calling a variadic functions are 'special' and not to be treated as regular functions or vice versa. Calling a variadic function through a regular function pointer, or vice …